linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Glynn Clements <glynn@gclements.plus.com>
To: jakeravenwood@yahoo.com
Cc: linux-admin@vger.kernel.org
Subject: Re: apache 2 expiresdefault
Date: Wed, 9 Jul 2008 21:59:19 +0100	[thread overview]
Message-ID: <18549.9895.935520.160121@cerise.gclements.plus.com> (raw)
In-Reply-To: <985389.11586.qm@web46108.mail.sp1.yahoo.com>


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>

  reply	other threads:[~2008-07-09 20:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-08 21:09 apache 2 expiresdefault Jake Ravenwood
2008-07-09  3:18 ` Glynn Clements
2008-07-09  4:17   ` Hubert Grzeskowiak
2008-07-09 17:02     ` Jake Ravenwood
2008-07-09 20:59       ` Glynn Clements [this message]
     [not found] <8CAB003ECFFDA63-1344-1D19@WEBMAIL-DC15.sysops.aol.com>
2008-07-09 19:04 ` Jake Ravenwood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18549.9895.935520.160121@cerise.gclements.plus.com \
    --to=glynn@gclements.plus.com \
    --cc=jakeravenwood@yahoo.com \
    --cc=linux-admin@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).