Reputation: 3616
Below is my code .. In IE and Firefox it works fine .. i.e after 10seconds it gets redirected to www.google.com .. but the same code doesn't work in Chrome
<html>
<head>
<title>App- Log In</title>
<meta http-equiv="refresh" content="10; url=http://www.google.com">
<script language="JavaScript">
function noBack(){window.history.forward()}
noBack();
window.onload=noBack;
window.onpageshow=function(evt){if(evt.persisted)noBack()}
window.onunload=function(){void(0)}
</script>
</head>
<body>
Testing
</body>
</html>
Upvotes: 4
Views: 4490
Reputation: 3645
Your problem is this line:
window.history.forward()
Whenever this line has executed, the meta-refresh disables in Chrome.
My recommendation would be not to try to disable the back button since it isn't working reliably, and from what I gather it can't be done.
Upvotes: 1