I'm linking to a page (page1) which performs a redirect the final page (page2). But on page 2 the document.referrer property is empty but only in I.E because of the redirect.
Is there a way to solve this?
Thanks Van
--开发者_如何转开发Edit---
Page A simply as a link to Page B. Page B uses window.location to redirect to the url for Page C. But as stated the document.referrer property is empty in Page C after the redirect from Page B this is only the case in I.E.
Also - I am only using http not https
It seems to be a bug of IE, see: http://webbugtrack.blogspot.com/2008/11/bug-421-ie-fails-to-pass-http-referer.html
If it's IE, create a new link to that url, then click it.
function goto(url){
if(isIE){
var referLink = document.createElement('a');
referLink.href = url;
document.body.appendChild(referLink);
referLink.click();
}
else{
location.href = url;
}
}
精彩评论