Re: apache 2 expiresdefault
Glynn Clements <[email protected]> Wed, 9 Jul 2008 21:59:19 +0100
| Newsgroups | org.kernel.vger.linux-admin |
|---|---|
| Message-ID | <[email protected]> |
Jake Ravenwood wrote:
> I am still looking on how to have their browsers/proxy server to
> refresh soon. or trick their browser that there is new content already
> so they need to get the new copy.
>
> i am thinking of changing the directoryindex and point to index.php
> -such that it changes the inode,mtime and filesize. then inside
> index.php i have:
>
> <?
> header("Cache-Control: no-store, no-cache, must-revalidate");
> header("Cache-Control: post-check=0, pre-check=0", false);
> header("Pragma: no-cache");
>
> call_the_original_html_file.
>
> ?>
>
> how to i call the original html file from index.php? i mean, index.php
> will load first then it will call/load html file.
There is no need for that; if the browser/proxy is actually checking
with your server, you can just use "touch" on the file/directory to
update the timestamp. This will affect the Last-Modified header, and
cause any If-Modified-Since test to succeed (i.e. the "new" data will
be returned rather than just a 304 "Not Modified" response).
However, the same issue will affect all pages. Nothing in the headers
(or http-equiv tags) for one page will affect the expiry status of
other pages which have been cached. The only solution there is to
rename all of the links (e.g. change .html -> .htm, change the case of
the first letter, etc) so that the content appears to be new.
--
Glynn Clements <[email protected]>