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.
HttpContext.Current.Response.Cache.SetAllowResponseInBrowserHistory(false);
HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache);
HttpContext.Current.Response.Cache.SetNoStore();
Response.Cache.SetExpires(DateTime.Now.AddSeconds(60));
Response.Cache.SetValidUntilExpires(true);
HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache);
HttpContext.Current.Response.Cache.SetNoStore();
Response.Cache.SetExpires(DateTime.Now.AddSeconds(60));
Response.Cache.SetValidUntilExpires(true);
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.
Please suggest me some solution, when user clicks back button in browser after logout, then webpage must expired.

Nitesh KejriwalPosted Sep 4, 2014, 5:58 AM
Santosh KumarPosted Sep 4, 2014, 5:17 AM
I have tried in the way which is provided in those links, but the page is posting to and coming back, which is making odd look, is it possible like bank like application, where, when user clicks back button it will show web page expire message
Nitesh KejriwalPosted Sep 4, 2014, 4:07 AM
http://stackoverflow.com/questions/3343214/expire-a-particular-page-on-back-button-of-browser
http://stackoverflow.com/questions/3316062/if-users-press-the-browsers-back-button-to-reach-the-prior-page-then-page-shou