Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have two pages in my application one is login page to go for another page..second page contains logout button . if i click that logout it is going to login page .But problem is, after logged out, if i click back button second page directly opening .how can i remove back button option for second page after logged out successfully.
Posted
Updated 28-Jan-14 19:58pm
v2
Comments
Sergey Alexandrovich Kryukov 29-Jan-14 1:58am    
Did you try to find the answer? This is written in millions places...
—SA
sudhakar19 29-Jan-14 2:17am    
ya i hav tried somany but not working

Please see my comment to the question. Before asking your questions, you really need to do some search. This is explained, in particular, in this CodeProject article: Web Development - Disabling the back button[^].

—SA
 
Share this answer
 
XML
<script>
  function preventBack(){window.history.forward();}
  setTimeout("preventBack()", 0);
  window.onunload=function(){null};
</script>




Add to your main page.
 
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