I am using this client side code to disable browser back button. The function "changeHasgOnLoad" is called in body tag's onload
function changeHashOnLoad() {
window.location.href += "#";
setTimeout("changeHashAgain()", "50");
}
function changeHashAgain() {
window.location.href += "1";
}
var storedHash = window.location.hash;
window.setInterval(function () {
if (window.location.hash != storedHash) {
window.location.hash = storedHash;
}
}, 50);
Its working fine but when i open it in IE its preventing page from scrolling. but when i refresh the page then it works well. Please help me if anyone can know its reason.