0

After logout browser should not allow to go back when user clicks on browser back button. This functionality is working fine in IE, FF but not working in Safari. Tryied a lot but not able to solve. Here is the code that i have used.

$(document).ready(function(){ 
   window.location.hash="";
   window.location.hash="";
   window.onhashchange=function(){
window.location.hash="";
   } 
});
Oskar Kjellin
  • 21,280
  • 10
  • 54
  • 93
Pasha
  • 231
  • 2
  • 3

1 Answers1

0

You can Disable safari browser back button if above trick is not working for you. try this to disable back button-

   function noBack(){window.history.forward();}
   noBack();
   window.onload=noBack;
   window.onpageshow=function(evt){if(evt.persisted)noBack();}
   window.onunload=function(){void(0);}
Suhas Gosavi
  • 2,170
  • 19
  • 40