httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Dyer-Bennet" <>
Subject RE: [users@httpd] How to use mod_expire and how to tell on user browser that contentis changed.
Date Fri, 23 May 2008 20:54:23 GMT

> Ali Nebi [] said,

> For example if i have set expire time to be this way "access 2 weeks",
> but content is changed before this time, this mean that user will not
> able to see the new content, because expire time. Is there some way to
> tell user browser that this content is changed and to cache 
> the new one?

Won't work; the user's cache contains what you told it, and the browser
won't query for the updated content if the cache "knows" it's valid. 

Generally, setting valid dates into the future can cause you a lot of
problems.  It might work okay for a monthly newsletter most of the time
-- until an incorrect one is posted and you need to issue a quick
update, anyway. 

Not sure what stage you're at, and it may be too late for really much of
anything to help you.  But just in case, there are some other

One is to have your site respond to "if-modified-since" headers in GET
requests.  This lets your site decide, on each touch, whether to send
new content or not.  (This can get tricky for scripts, they have to
figure out what modified date to set based on all their sources of
input).  Note that this won't help with long-expire caches alread in
users' browsers, though; you have to wait for those to expire.  But if
you don't set any valid dates into the future, the browsers will query
you for updates and often you can respond "not changed" and save the
time and bandwidth of sending the whole page. 

Another hack that can help in an emergency is to change the name of the
resource; then the cached copy won't relate to the new copy.  Of course
this doesn't work for the top-level index file :-).  Also, it can be a
problem to rename too many of the items on your site. 


The contents of this message and its attachments, if any, are meant for the sole use of the
intended recipient and may be confidential, privileged, or otherwise protected from disclosure.
If you are not the intended recipient of this message or have received this message in error,
please delete it, immediately alert the sender by reply e-mail, and do not read, disclose,
distribute, or otherwise use the information contained herein. If this message was misdirected,
neither Pine River nor its affiliates waives any confidentiality or privilege. Pine River
retains and monitors e-mail communications sent through its network. This e-mail does not
constitute or form part of any offer or invitation to sell, or the solicitation of an offer
to purchase any investment and is provided for information purposes only. Pine River believes
that the information it provides is accurate and complete as at the date of publication, but
does not grant any warranty of such and neither Pine River nor its affiliates accepts any
liability in respect of errors or omissions. Past performance is not necessarily a guide to
future results.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message