...

View Full Version : Login/Logout one more time



esb01
01-15-2005, 09: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?

Thanks

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

esb01
01-15-2005, 11:22 PM
maybe they don't but the browser's back button does...

gwendaal
01-16-2005, 09: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 :-)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum