[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.


Closed Thread
 
LinkBack Thread Tools
Old 05-14-2004, 01:10 PM   #1 (permalink)
New Member
 
Join Date: May 2004
Posts: 2
3.00 NP$ (Donate)

3rulzs is an unknown quantity at this point


Back Button problem after log out HELP!

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
3rulzs is offline  
Old 05-15-2004, 06:34 PM   #2 (permalink)
Account Suspended
 
Join Date: May 2004
Location: usa
Posts: 103
213.00 NP$ (Donate)

pinkfluffybunny is an unknown quantity at this point


Everypage

Response.Expires = 0
Response.Expiresabsolute = Now() - 2
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "no-cache"
pinkfluffybunny is offline  
Old 05-17-2004, 06:55 AM   #3 (permalink)
New Member
 
Join Date: May 2004
Posts: 2
3.00 NP$ (Donate)

3rulzs is an unknown quantity at this point


Thanks for the example but it still expires the page when I navigate within the website with the back and forward buttons.
3rulzs is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 03:09 AM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85