Setting a new URL using location.href will change the HTTP_REFERER on Firefox/Opera/Safari, but NOT on IE
Here is the hack to fix this (quoted from here):
/* location.href FIX for MSIE */
//http://blogs.msdn.com/ie/archive/2008/10/30/hot-off-the-press-codefocus-on-ie8.aspx#9028128
function setHref(url) {
var isIE = (navigator.appName.indexOf("Microsoft")!=-1) ? true : false;if (!isIE) {
//Standards based browsers
parent.location.href = url; // Set target: self. / parent. / top.
} else {
var lha = document.getElementById(‘_lha’);
if(!lha){
lha = document.createElement(‘a’);
lha.id = ‘_lha’;
lha.target = ‘_parent’; // Set target: for IE
document.body.appendChild(lha);
}
lha.href = url;
lha.click();
}
}




bar();
// 
