Click here to Skip to main content
15,936,337 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I have a login page, after login i am redirecting to profile page where users can logout, after logout i am again redirecting to same login page, and i have used the following methods to clear the browser session(I am using IE 8 and FireFox). but they are not working. When I click back button in Login page, previous page is displaying instead of webpage expire message.


Here we are using same master page for both login page and profile page after login. And I have added the above methods In both master page and in login page. But they are not working. Suggest me some solution, when user clicks back button in browser after logout, then webpage must expired.

1 solution

try this script.

  function preventBack(){window.history.forward();}
  setTimeout("preventBack()", 0);
Share this answer
santoshkumar413 4-Sep-14 3:49am    
@vks9009, Thanks for the reply, when users clicks back button of browser, then webpage expired message need to be displayed, like banking application

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