Re: apache 2 expiresdefault

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Newbie]     [Audio]     [Hams]     [Kernel Newbies]     [Util Linux NG]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Device Drivers]     [Samba]     [Video 4 Linux]     [Git]     [Fedora Users]

  Powered by Linux