Excuse me if this has been asked before. I have a website that requires you to log on with a user id. The user clicks on the log out button it logs the user out fine. The problem I'm having is the user can click the back button and it returns them to the previous page. I know this is how it is suppose to work because I'm not clearing the cache on the browser. If I use this
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.Expires = -1
if not Session("UserID") <> "" then
Response.Redirect("Login.asp")
end if
it works perfect for the log out process but it expires my webpages within the site which I don't want. In my perfect world I would like to login to the website browse where ever in the website clicking on links, using the back and forward buttons whenever I like without the page expiring except when I click the logout button, then I click the back button it sends me to a page that make me log back in instead of sending me back to the previous page. Some websites that have my example are
http://www.discovercard.com
http://www.citi.com
Hopefully thats clear as mud!
Please post a some example code if you know a fix.
Thanks
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.Expires = -1
if not Session("UserID") <> "" then
Response.Redirect("Login.asp")
end if
it works perfect for the log out process but it expires my webpages within the site which I don't want. In my perfect world I would like to login to the website browse where ever in the website clicking on links, using the back and forward buttons whenever I like without the page expiring except when I click the logout button, then I click the back button it sends me to a page that make me log back in instead of sending me back to the previous page. Some websites that have my example are
http://www.discovercard.com
http://www.citi.com
Hopefully thats clear as mud!
Please post a some example code if you know a fix.
Thanks












