Click here to Skip to main content
16,016,134 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i want to know waz the way to disable the browser back button when user logout...
i have used session for security purposes and im destroying session at logout..
everything is working perfectly except the thing that if the page before we click logout is a POSTBACK page, then on clicking the browser back button it shows the last visited page..
i have also used window.history.(forward or back) but does n't work...
and even i have distroyed the cache of the page is well..
but i cant destroy when page postbacks..
because as it wud show the message "the page has expired" even when the user is still logged in...
i want to fire the page load event on browser back button so that it wud check the session state on page load and it wud redirect back to login page...
any solution for this friends????
i want the code in c# (web devolpment).
thanks :)
tc all
Posted
Updated 21-Jan-10 19:07pm
v3

Search on google threw this up[^].
 
Share this answer
 
You can turn off caching for all your pages, with
Response.Cache.SetCacheability(HttpCacheability.NoCache). 


You can also do something like:
Response.Cache.SetExpires(DateTime.UtcNow.AddHours(-1));
Response.Cache.SetNoStore();
 
Share this answer
 
v2

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