Web tier: servlets, JSP, Web frameworks: how can i prevent viewing the page after sign out
- Posted by: Seetharam kumar Devarasetty
- Posted on: March 29 2005 08:13 EST
Would u please help me out in getting the code regarding cookies? I hope u people will understand my problem and help me out at an immediate response.
I need to prevent any user to view the last page before he signs out. As we know, in yahoo or any site, when we sign out, and again clicking on the back button of ur computer screen, we'll be getting "warning : page has been expired". The same way i need to prevent any user to not to view, after he signs out. I'm using "Cookies" concept. Please help me in getting the code.
I'm really graceful to those who provide me a solution to my problem. Advance congrats!
You can do this by setting http headers telling the browser not to cache the page. When it doesn't find the page it's trying to go back to in it's cache it will try your server again and you should be able to reject their request based on the fact that they're not logged in anymore.
That's not a secure solution, since you can never guarantee what the client actually does with the pages you send it but it should fix the majority of normal browser users.