Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Session problem plz

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic