Win a copy of Functional Reactive Programming this week in the Other Languages forum!
    Bookmark Topic Watch Topic
  • New Topic

Session problem plz

 
s. anitha
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Report post to moderator
after pressing logout i invalidated the session.then i press the

back i show that the page has expired.

using this code:

<% response.setHeader("Pragma","no-cache");%>
<% response.setHeader("Cache-Control","no-store");%>
<% response.setDateHeader("Expires",-1);%>

the expired page is showing using this code

my problem is if i press refresh or f5,it

is showing the pages .how to avoid these.plz help me.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Report post to moderator
Are you sure your logout is working? Try adding some logging so you can see if the second request (when you hit F5) is causing the code to execute. The only way you can get the page to be shown again is if the browser requests the page and the server returns the page, so you should make sure you're not returning the page.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Report post to moderator
That's a nice piece of 'no cache' code, but are you sure you send it with every page sent to the user while they are logged in? It's not good enough to send it after the fact, useless even.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65218
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Anitha, please do not post the same question more than once.

thanks,
bear
Forum bartender
[ January 18, 2005: Message edited by: Bear Bibeault ]
 
    Bookmark Topic Watch Topic
  • New Topic