Hello, stonemens:
As you request, the best way to do it is by using metatags:
<meta http-equiv="Expires" content="Mon, 26 Jul 1997 05:00:00 GMT" />
<meta http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
You can place them at the very top of your pages, the first one
specifies that the page expires in the "past" so there is no need for
the browser to cache it, the second tag, specifies to don't store the
page, don't cache the contents and check the stored contents (if any)
with the received ones, the third one is for HTTP/1.0 compatibility.
This is what I use in my own dynamic pages to prevent caching and
works in most browsers, if you have any problem, or you want a PHP
only solution, just request for a clarification, this is a technical
question and I'm here to help you until you get what you want.
I hope this is what you were looking for, but in any case, before rate
this question, please, request for a clarification.
Also, if you need help integrating the tags in your site, please,
request for a clarification.
Regards. |
Clarification of Answer by
joseleon-ga
on
22 Dec 2003 06:34 PST
Hello, stonemens:
That's exactly what the browser is setup to do by default, I mean,
this is how it "should" work, but in most cases, users have proxy
caches in corporations which make necessary to use those metatags to
force refresh.
In any case, and accordingly to the right RFC:
Cache Revalidation and Reload Controls
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.4
You can try first with just this metatag:
<meta http-equiv="Cache-Control" content="must-revalidate" />
To force any cache device (browser, proxy, etc) to revalidate the
contents to see if have changed.
Tell me if it works the way you want, and keep requesting for
clarifications until we get to a common solution, I'm here to help
you.
Regards.
|