Win a copy of Event Streams in Action this week in the Java in General forum!
  • Post Reply 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Warning: Page has Expired

 
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If a user uses the back button to browse the previous pages(only the page which comes after a POST operation), he gets a message in IE...
"Warning: Page has Expired The page you requested was created using information you submitted in a form. This page is no longer available. As a security precaution, Internet Explorer does not automatically resubmit your information for you.
To resubmit your information and view this Web page, click the Refresh button."
I am setting the header to no-cache. Thinking that this is the problem, I changed the code like this
if (request.getMethod()=="GET")
{ response.setIntHeader("max-age", 0);
response.setHeader("Cache-Control","no-cache");
response.setIntHeader ("Expires", -1);
response.setHeader("Pragma","no-cache");
}
It doesn't help. I even tried to change the browser cache properties so that it will cache always(which I don't like to do).any ideas on how to fix the problem?
 
Beksy Kurian
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have gotten the following document from microsoft page http://support.microsoft.com/support/kb/articles/Q183/7/63.ASP
I had already disabled 'do not save encrypted pages to disk". still it doesn't work. and I am using IE 5.0. Even netscape has the same problem. a slight change in the error message though. Has anybody done any work around for this problem?
Beksy
 
Beksy Kurian
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am adding a message which I got from PHP forum. I would like to know whether we can do something like this if we are using servlets(Jrun-servlet engine and apache server).
"Author: Anthony Boyd (209.78.54.19)
Date: 2001-04-12 18:10:52
I am adding this comment months after the original message just in case someone is doing a search for this very problem. Because there is a perfect solution that is not mentioned here.
When you use PHP's sessions, you get "page expired" errors when using the back button because PHP's session management sends out a "nocache" header. You can change that header to instead send "private" or "public" and suddenly your back button will again. However, your pages will be outdated -- never grabbing fresh data, always showing the same listing. To solve this, you want to completely BLANK OUT the header. How do you do this? In php.ini, make the session.cache_limiter look like this:
session.cache_limiter = ;
That's right, no value. You do this, and viola, the cache control returns to "at the browser's discretion" -- which means, you always get fresh data, and you never see a "page expired" warning. Yay."
appreciate a reply
Beksy
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!