|Hi, having trawled the net, I cant find an absolute answer, so am hoping you can help.|
I am building a corporate web site that has a variable strap line / message on the home page. At the moment the message is randomly generated and may not therefore relate to what a visitor is interested in.
What I want to do is examine the URL of the referring page to see if there are any clues as to why the Visitor has come to the site, and if there are to present them with a suitable message pointing them in the right direction.
I have tried request.getHeader("referer"), but this only seems to work for internal links and not for links in from say a Google Search.
So for instance, if we were able to pick up the following URL "http://www.google.co.uk/search?hl=en&source=hp&q=staplers&btnG=Google+Search&meta=&aq=f&oq=", then we could detect the word "staplers" in the middle and present a message relating to Staplers to the Visitor.
No I don't sell Staplers, it was the first example that came to mind !!!
So how do I get the Full URL of the Previously visited page ?