Click here to Skip to main content
15,895,777 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to avoid browser to back on the previous open pages after logout.
Posted

Also check this CP trick
Browser back button issue after logout[^]
 
Share this answer
 
try this --

XML
<script type="text/javascript" language="javascript">
function disableBackButton()
{
window.history.forward()
}
disableBackButton();
window.onload=disableBackButton();
window.onpageshow=function(evt) { if(evt.persisted) disableBackButton() }
window.onunload=function() { void(0) }
</script>
then call noBack() function on <body> on the following way:
<body onload="noBack();">
This code will not let the user get BACK after Sign out.
 
Share this answer
 
Hi,

Javascript code for block browser back button not all browser supported. Also it is not good to doing some thing with browser. So if possible than handle in code.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900