This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Hands On Software Engineering with Python and have Brian Allbey on-line!
See this thread for details.
Win a copy of Hands On Software Engineering with Python this week in the Jython/Python 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
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

Expiring a page  RSS feed

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I am trying to expiry a page in the browser history/cache. Basically here is the problem
(post)
jspPage1 ---> jspPage2

When the user is on jspPage2 and presses the browsers back button I want the jspPage1 reloaded/refreshed from the server.
I tried using the META tag
<META http-equiv="Pragma" content="no-cache">
but somehow this does not seem to solve the problem... (I am using IE 5.5)
Thanx,
 
Abraham Jacob
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like I found the answer... (just in case anybody else needs it...)
Using JSP...
<%
response.setDateHeader ("Expires", 0);
response.setHeader("Pragma", "no-cache");
response.setHeader("Cache-Control", "no-store");
response.setDateHeader("max-age", 0);
response.setDateHeader("Expires", 0);
%>

Now I have another question.....
Is there any way to find out that the page has expired and that it should reload itself.
Right now in IE 5.5 it shows me that the page has expired and that I should physcically press the refresh/reload button...
 
Ranch Hand
Posts: 2596
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Add this tag in the <head> and </head> tag of your HTML, it will refresh the page after every 10 seconds. But, page refreshing itself this frequently is not a good idea, unless you are refreshing some live match score or somthing...

- Manish
 
Abraham Jacob
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx for the reply manish
Is there a way to find out that when the user press the back button or the refresh button it is actually loading an expired page which can be trapped by JavaScript ?
 
It's just like a fortune cookie, but instead of a cookie, it's pie. And we'll call it ... tiny ad:
ScroogeXHTML 8.0 - RTF to HTML5 and XHTML converter
https://coderanch.com/t/704747/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!