Back Button problem after log out HELP!

SpaceshipSpaceship
Watch

3rulzs

New Member
Impact
0
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
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
Everypage

Response.Expires = 0
Response.Expiresabsolute = Now() - 2
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "no-cache"
 
0
•••
Thanks for the example but it still expires the page when I navigate within the website with the back and forward buttons.
 
0
•••
Appraise.net

We're social

Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomainEasy — Live Options
DomDB
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back