• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Page Expires

 
Yogendra Joshi
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bear ,

I have always been a "FAN" of your posts.. Your posts has always helped me and other ranchers around here at the Ranch.

This time , I've got a query for you and may be for someone who can really help me or guide me out.

I've heard that we can expire the page using the meta tag or using the scriptet. Now, thats fine ! But though it might be a good idea to expire the page once its visited. I want to know why would one use this idea and that too , when we press back button of the browser it says "The page you are trying to access has been expired , click Refresh....." , Once we refresh it , It again gives the same details it had when it was not expired.

This has really been nailing me. Request you to please guide me on this.

Thanks in advance.

Yogendra Joshi.
[ May 30, 2006: Message edited by: Bear Bibeault ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64620
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How have you set the page to expire?
 
Yogendra Joshi
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been using this :

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

and using the meta tag i am using this :

<meta http-equiv="expires" content="0">

Thanks for any help.

Yogendra Joshi.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64620
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The no-cache headers should prevent the browser from caching the page and retrieving the cached version when the same URL is hit. The Back button is a different matter.

I'd suggest searching through previous posts in this and the HTML forum for previous discussion on this issue.

(P.S. disabling the Back button is not an effective strategy).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic