Click here to Skip to main content
15,891,855 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
hi..
please tell me about log out ...for example in gmail of email when we sign out . after
sign out ..if we prss back button ...page redirect to login page...
Please give an implementation..


Thank you
Posted

In general the logoff process kills the session on client and server side, and/or clears the authenticated status of the session. If you want to access any protected page, you get a redirection to the logon page. If you are interested in how you can achieve this in ASP.NET, just create a project using the forms authenticated template included in Visual Studio.
Here you have an overview: http://msdn.microsoft.com/en-us/library/ff647070.aspx[^]

An other consideration: back button has also to do with caching. With just the above things "back" will show the cached page. You need to disable client side caching[^] to ensure page reload from server and you can redirect to logon page.
 
Share this answer
 
v6
In simple way the answer is, don't be depend on the browser's back button, Implement logic in your server side component to check the user is authenticated or not , if not then redirect to Login page.
 
Share this answer
 
Following tip should help: Browser back button issue after logout[^]
 
Share this answer
 
 
Share this answer
 

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