But I don't want to go for this code because it is not caching any of the page (everytime is it going to server to display page weather the page is static or not).
This question comes up a lot, and the simple answer is that its just a "fact of life". You could amend that request above to check the Request.Url and see if it matches your logout url.
You can also use some javascript to kick the user out if they go back to the page but this only works in IE.
Abdul Javed ...
Member
70 Points
318 Posts
Avoid to display previous page after logout
Apr 20, 2009 09:51 AM|LINK
Hi
In my application I want once a user is logged out & if he press back button then it should not display page from cache..
I have written
protected void Application_BeginRequest(object sender, EventArgs e){ Response.Cache.SetCacheability(
HttpCacheability.NoCache); }But I don't want to go for this code because it is not caching any of the page (everytime is it going to server to display page weather the page is static or not).
I want same for the use after logout event
Thanks,
Abdul Javed Khan
malcolms
All-Star
18687 Points
3124 Posts
MVP
Re: Avoid to display previous page after logout
Apr 20, 2009 10:30 AM|LINK
rtpHarry
All-Star
56620 Points
8958 Posts
Re: Avoid to display previous page after logout
Apr 20, 2009 10:30 AM|LINK
This question comes up a lot, and the simple answer is that its just a "fact of life". You could amend that request above to check the Request.Url and see if it matches your logout url.
You can also use some javascript to kick the user out if they go back to the page but this only works in IE.
If the user presses the back button and tries to do anything then it wont work because as far as the system is concerned they are logged out.