PDA

View Full Version : HTTP Referrer in PHP and javasscript location.href


Fatman
04-30-2003, 01:07 PM
Im tracking the Referrer using the memebr of HTTP_SERVER_VARIABLES

this works fine :)

however, if one of my links is a javascript

location.href()

the referrer details are not passed throught :(

help?

Spookster
04-30-2003, 01:24 PM
Referer information is not something you can rely upon. That information is supplied by the web browser. Not all web browsers supply it or supply it correctly. Some browsers even allow people to modify their referer information. There are also little plugin that allow you to spoof your referer information.

Fatman
04-30-2003, 01:39 PM
yeah its fine, i think ill have to use images and use a rollover and an <a href

fatman

mordred
04-30-2003, 02:27 PM
Generally the HTTP referer value is only passed to the next page if the user clicked a link on the page before. Redirects by JavaScript or typing the URL into the address bar do not set the referer value. At least I think that's how it works. And Spookster is very right about the unreliability of HTTP referers.

Fatman
04-30-2003, 02:29 PM
ok thanks for the info :)

ill just use images