Its pretty frustrating to see that IE doesn’t set the ‘referer’ header when navigating pages using ‘location.href’. The header is set properly if you are using anchor tags (<A>) to navigate through pages.
Normally this is much of an issue for navigation unless you validate using the referer header. One such case is when you are using ‘Re-write’ rules for your site. In such cases, although your site will work on other browsers, it fails in IE because of the missing referer header.
Microsoft doesn’t seem to be in any mood to fix this soon and have postponed the fix to IE9
check out the link below.
Re-opening to be fixed in IE9
HTTP REFERER header not set when location.href is used for page navigation | Microsoft Connect.
One interesting workaround which I found here is to simulate an anchor click like this:
function goTo(url) {
var a = document.createElement("a");
if(!a.click) { //only IE has this (at the moment);
window.location = url;
return;
}
a.setAttribute("href", url);
a.style.display = "none";
$("body").append(a); //prototype shortcut
a.click();
}
