Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Smarty with Page Expires

Status
Not open for further replies.

rejoice

MIS
Jun 5, 2002
42
0
0
MY
Does anyone know how to generate a page with smarty and the page has an expiry date?

How can we check whether this function has taken effect?

source:
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");

Many thanks.
 
Can we put something in HTML page to expire the page? If yes, how would the code look like?
 
It is the browsers that process the cache directives. And, of course, every browser does it differently. You can look into the 'pragma no-cache' and other meta tags in the page, but be aware, that browsers act differently.
For example, even though you might put the most restrictive cache headers and page expiration into the HTML, even a 'must revalidate', browsers such as Opera will not reload the page when the back button is used. Their developers have the standpoint that the RFC requires a reload only when the page is accessed through a link.
Do a quick google for meta tags for cache control.
 
oic.

By the way, why should we use META tag? instead of Javascript? Can Javascript force the page refresh?
 
Javascript turned off -> no reaction to anything you code.
META tags are standard tags that are introduce "header" fashion information and cannot be "turned off".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top