View Single Post
  #1 (permalink)  
Old 06-18-03, 02:12 AM
shaky shaky is offline
New Member
 
Join Date: Jun 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Question how to disable browser's back button after logout

Hi!
I'm searching for an expert using the logout function in classic asp language.

i need help on my asp project right now.
hope u can give me some help!

i have already done my login page which will redirect to "check.asp" where i check the username and password and set session("username") = request.form("username"). User then can logout by click logout --> redirect to "logout.asp" which i"ve set session("username")="".

The problem is, when user logout as long as the browser is open you can always hit the browser "back" and "forward" buttons all day long , even to the page they can't visit.

I even try to use Session.Abandon to kill an active session but this seems didn't work too. I've also try to use cookies, but i can still hit the back button!

i also try put this script on my every page to check session
<%
If Session("username") = "" then
Response.Redirect("notallow.asp")
End If
%>

and try to use this header:-

<%Response.CacheControl = "no-cache"%>

in every page except on some pages containing forms, but the problem is still there.I can still hit the back button after logout,
except if i click the "refresh" button, then only it will redirect to "notalllow.asp"

for your info, i'm currently using ie 6 as my browser.

Please help me!
Urgent!

Thank you.

shaky512@hotmail.com
Reply With Quote