httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Evans <>
Subject Re: [users@httpd] Browser, Apache and caching...
Date Wed, 02 Feb 2011 17:47:41 GMT
On Wed, Feb 2, 2011 at 5:06 PM, Tony Anecito <> wrote:
> Hi All,
> I am wondering for the browser cache to work does the expires headers in the
> apache config file have to be setup? Or by default when the page request from
> the browser hits apache does it look at the file modified time stamp for the
> file on disk or Apache cache and compares to whatever the request has in it (I
> assume a file timestamp)?
> Just trying to figure out if expires header is really needed because if you use
> it by setting a future date then the only way to get the file sent across due to
> some change is to rename it slightly.
> Thanks,
> -Tony

Correct, sending an Expires header will make UA caches store the
object unconditionally until it gets ejected or the date specified is

Instead of sending Expires, if you send a Last-Modified header (which
will happen by default for files served from disk by Apache), then the
next time the UA requests that, it should add a header
If-Modified-Since header. If the file hasn't been modified since that
time, then Apache will send an empty 304 response (Not Modified), and
the UA will serve from cache.



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