Disable Browser Back Button after LogOut in ASP.Net using JavaScript - cSharp Coder

Latest

cSharp Coder

Sharp Future

Wednesday, May 19, 2021

Disable Browser Back Button after LogOut in ASP.Net using JavaScript

 


Disable Browser Back Button Script
The following JavaScript code snippet must be placed in the HEAD section of the Page where the User must be prevented from going back.
<script type = "text/javascript" >
   function preventBack(){window.history.forward();}
    setTimeout("preventBack()", 0);
    window.onunload=function(){null};
</script>
 

No comments:

Post a Comment