Hi Tom,

So for the If-Last-Modified header it has to go all the way back to the origin 
server and not stop at the browser cache or proxy server correct? The Proxy 
does 
not periodically (async) check the origin server? Whereas for the Expires 
header 
it will not go to the origin server but rather than the browser or proxy if the 
time has not expired for that file.

Thanks for the prompt reply.
-Tony



----- Original Message ----
From: Tom Evans <tevans...@googlemail.com>
To: users@httpd.apache.org
Sent: Wed, February 2, 2011 10:47:41 AM
Subject: Re: [users@httpd] Browser, Apache and caching...

On Wed, Feb 2, 2011 at 5:06 PM, Tony Anecito <adanec...@yahoo.com> 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
reached.

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.

Cheers

Tom

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
  "  from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to