View Full Version : Login/Logout one more time

01-15-2005, 10:49 PM
The only problem I have is how to prevent a user to go back on the browser's back button click after being logged out.

1. The following method is fine since the Back Button doesn't work -
<input onClick="window.location.replace('login.asp')" type=button value="Log Out">

2. But <a href="login.asp">Log Out</a> doesn't work properly unless I add Response.Cache.SetCacheability(HTTPCacheability, NoCache) in the Page Load event.

Would anybody tell me what is the difference between href and window.location.replace and why do they work differently?
Also which method is preferred?


01-15-2005, 11:13 PM
ive always thought they worked togeva

01-16-2005, 12:22 AM
maybe they don't but the browser's back button does...

01-16-2005, 10:07 AM
it doesn't matter at the first click somewhere he will be kicked out

you cannot unallow esb01 someone to print the page :-)