4

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>
ironsam
  • 630
  • 5
  • 15
JAB
  • 3,546
  • 9
  • 36
  • 39

1 Answers1

1

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.

Community
  • 1
  • 1
Per Salbark
  • 3,597
  • 1
  • 23
  • 24
  • Correct Per .. If i remove the back button navigation script .. it works fine even in chrome .. But i can't ignore that script .. – JAB Jun 29 '12 at 12:04