[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-admin
Subject:    Re: apache 2 expiresdefault
From:       Glynn Clements <glynn () gclements ! plus ! com>
Date:       2008-07-09 20:59:19
Message-ID: 18549.9895.935520.160121 () cerise ! gclements ! plus ! com
[Download RAW message or body]


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 <glynn@gclements.plus.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic