PDA

View Full Version : document referrer only works in Netscape


NymRod
02-09-2003, 03:17 AM
Howdy

I'm using different variations of this script but it only works in Netscape.
I'm using IE 6 not 3.02 but it still sends me to the wrong page URL.

Is there any way to detect and redirect depending on the referrer so it will work in IE too?
I know it wont work in IE 3.02 but I thought that was the only version it didn't work with.
Maybe something wrong with my IE?


if (document.referrer.substring(0,22) != "https://www.paypal.com")
top.location.href = "http://WrongPageURL"


Thanks

Nymrod

scoutt
02-09-2003, 10:42 AM
I wouldn't think it was the browser. some servers and some browsers just don't send a referer. some people can even block it in the browser.

Jon Hanlon
02-09-2003, 05:12 PM
Scoutt's right. The referrer is only set if the user clicks on a link to navigate to your page. If they use History, Favorites or script the referrer is blank.