* apache 2 expiresdefault
@ 2008-07-08 21:09 Jake Ravenwood
2008-07-09 3:18 ` Glynn Clements
0 siblings, 1 reply; 6+ messages in thread
From: Jake Ravenwood @ 2008-07-08 21:09 UTC (permalink / raw)
To: linux-admin
hi,
i have a linux/apache2 newly setup. i put it online last week but after a day, i got a lot of email/phone complaints saying they are seeing old pages/old contents of the site. My site changes frequently(daily). after checking i found that apache has ExpiresDefault A2419200 which spells to 28days. I changed it to ExpiresDefault A0 and reload Apache. Some end-users are now seeing the new content but some are still seeing the old pages. What else i missed?
thanks,
jake
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: apache 2 expiresdefault
2008-07-08 21:09 apache 2 expiresdefault Jake Ravenwood
@ 2008-07-09 3:18 ` Glynn Clements
2008-07-09 4:17 ` Hubert Grzeskowiak
0 siblings, 1 reply; 6+ messages in thread
From: Glynn Clements @ 2008-07-09 3:18 UTC (permalink / raw)
To: jakeravenwood; +Cc: linux-admin
Jake Ravenwood wrote:
> i have a linux/apache2 newly setup. i put it online last week but
> after a day, i got a lot of email/phone complaints saying they are
> seeing old pages/old contents of the site. My site changes
> frequently(daily). after checking i found that apache has
> ExpiresDefault A2419200 which spells to 28days. I changed it to
> ExpiresDefault A0 and reload Apache. Some end-users are now seeing the
> new content but some are still seeing the old pages. What else i
> missed?
If someone already has a cached version with the 28-day expiry, their
web browser (or an intermediate proxy) is likely to keep using it
until it expires or until they force a reload. Nothing you do to your
web server can force those existing copies to expire prematurely.
--
Glynn Clements <glynn@gclements.plus.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: apache 2 expiresdefault
2008-07-09 3:18 ` Glynn Clements
@ 2008-07-09 4:17 ` Hubert Grzeskowiak
2008-07-09 17:02 ` Jake Ravenwood
0 siblings, 1 reply; 6+ messages in thread
From: Hubert Grzeskowiak @ 2008-07-09 4:17 UTC (permalink / raw)
To: linux-admin
Glynn Clements wrote:
> Jake Ravenwood wrote:
>
>> i have a linux/apache2 newly setup. i put it online last week but
>> after a day, i got a lot of email/phone complaints saying they are
>> seeing old pages/old contents of the site. My site changes
>> frequently(daily). after checking i found that apache has
>> ExpiresDefault A2419200 which spells to 28days. I changed it to
>> ExpiresDefault A0 and reload Apache. Some end-users are now seeing the
>> new content but some are still seeing the old pages. What else i
>> missed?
>
> If someone already has a cached version with the 28-day expiry, their
> web browser (or an intermediate proxy) is likely to keep using it
> until it expires or until they force a reload. Nothing you do to your
> web server can force those existing copies to expire prematurely.
>
hi Jake,
try adding those meta tags to your (x)html files (into the head part of
course):
<meta http-equiv="expires" content="-1">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
this won't force your clients to reload the page, but it should suppress
future caching. it's just html, so sure not every browser will interpret
that.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: apache 2 expiresdefault
2008-07-09 4:17 ` Hubert Grzeskowiak
@ 2008-07-09 17:02 ` Jake Ravenwood
2008-07-09 20:59 ` Glynn Clements
0 siblings, 1 reply; 6+ messages in thread
From: Jake Ravenwood @ 2008-07-09 17:02 UTC (permalink / raw)
To: linux-admin
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.
thanks,
jake
--- On Wed, 7/9/08, Hubert Grzeskowiak <linux-admin-ml@nemesis13.de> wrote:
> From: Hubert Grzeskowiak <linux-admin-ml@nemesis13.de>
> Subject: Re: apache 2 expiresdefault
> To:
> Date: Wednesday, July 9, 2008, 4:17 AM
> Glynn Clements wrote:
> > Jake Ravenwood wrote:
> >
> >> i have a linux/apache2 newly setup. i put it
> online last week but
> >> after a day, i got a lot of email/phone complaints
> saying they are
> >> seeing old pages/old contents of the site. My site
> changes
> >> frequently(daily). after checking i found that
> apache has
> >> ExpiresDefault A2419200 which spells to 28days. I
> changed it to
> >> ExpiresDefault A0 and reload Apache. Some
> end-users are now seeing the
> >> new content but some are still seeing the old
> pages. What else i
> >> missed?
> >
> > If someone already has a cached version with the
> 28-day expiry, their
> > web browser (or an intermediate proxy) is likely to
> keep using it
> > until it expires or until they force a reload. Nothing
> you do to your
> > web server can force those existing copies to expire
> prematurely.
> >
>
> hi Jake,
> try adding those meta tags to your (x)html files (into the
> head part of
> course):
>
> <meta http-equiv="expires"
> content="-1">
> <meta http-equiv="pragma"
> content="no-cache">
> <meta http-equiv="cache-control"
> content="no-cache">
>
> this won't force your clients to reload the page, but
> it should suppress
> future caching. it's just html, so sure not every
> browser will interpret
> that.
> --
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: apache 2 expiresdefault
[not found] <8CAB003ECFFDA63-1344-1D19@WEBMAIL-DC15.sysops.aol.com>
@ 2008-07-09 19:04 ` Jake Ravenwood
0 siblings, 0 replies; 6+ messages in thread
From: Jake Ravenwood @ 2008-07-09 19:04 UTC (permalink / raw)
To: linux-admin
you are saying that if i have the rewrite section added like below, and a request comes in, cache and proxy servers will treat them different? say if proxy server has a cache copy of www.mydomain.com, rewriting it to www.mydomain.com/newindex.html will display the new page and not the cached one?
> In the mean time, if you really need a resolution you can
> use
> mod_rewrite and do something like
>
>
>
> RewriteEngine On
>
> RewriteRule ^/$ /index.html [R,L]
>
>
>
> This will force the URI to change from
> http://www.example.com to
> http://www.example.com/index.html which are different
> requests from the
> caches perspective.? I just wouldn't suggest keeping
> that there for
> longer then you expect everyones cache to update.
>
>
>
> --Michael
>
>
>
>
>
>
>
> -----Original Message-----
> From: Jake Ravenwood <jakeravenwood@yahoo.com>
> To: linux-admin@vger.kernel.org
> Sent: Wed, 9 Jul 2008 1:02 pm
> Subject: Re: apache 2 expiresdefault
>
>
>
>
>
>
>
>
>
>
> 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.
>
>
> thanks,
> jake
>
>
>
> --- On Wed, 7/9/08, Hubert Grzeskowiak
> <linux-admin-ml@nemesis13.de> wrote:
>
> > From: Hubert Grzeskowiak
> <linux-admin-ml@nemesis13.de>
> > Subject: Re: apache 2 expiresdefault
> > To:
> > Date: Wednesday, July 9, 2008, 4:17 AM
> > Glynn Clements wrote:
> > > Jake Ravenwood wrote:
> > >
> > >> i have a linux/apache2 newly setup. i put it
> > online last week but
> > >> after a day, i got a lot of email/phone
> complaints
> > saying they are
> > >> seeing old pages/old contents of the site. My
> site
> > changes
> > >> frequently(daily). after checking i found
> that
> > apache has
> > >> ExpiresDefault A2419200 which spells to
> 28days. I
> > changed it to
> > >> ExpiresDefault A0 and reload Apache. Some
> > end-users are now seeing the
> > >> new content but some are still seeing the old
> > pages. What else i
> > >> missed?
> > >
> > > If someone already has a cached version with the
> > 28-day expiry, their
> > > web browser (or an intermediate proxy) is likely
> to
> > keep using it
> > > until it expires or until they force a reload.
> Nothing
> > you do to your
> > > web server can force those existing copies to
> expire
> > prematurely.
> > >
> >
> > hi Jake,
> > try adding those meta tags to your (x)html files (into
> the
> > head part of
> > course):
> >
> > <meta http-equiv="expires"
> > content="-1">
> > <meta http-equiv="pragma"
> > content="no-cache">
> > <meta http-equiv="cache-control"
> > content="no-cache">
> >
> > this won't force your clients to reload the page,
> but
> > it should suppress
> > future caching. it's just html, so sure not every
> > browser will interpret
> > that.
> > --
> > 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
>
>
>
>
> --
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: apache 2 expiresdefault
2008-07-09 17:02 ` Jake Ravenwood
@ 2008-07-09 20:59 ` Glynn Clements
0 siblings, 0 replies; 6+ messages in thread
From: Glynn Clements @ 2008-07-09 20:59 UTC (permalink / raw)
To: jakeravenwood; +Cc: linux-admin
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>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-07-09 20:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
[not found] <8CAB003ECFFDA63-1344-1D19@WEBMAIL-DC15.sysops.aol.com>
2008-07-09 19:04 ` Jake Ravenwood
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).