Re: Browser, Apache and caching...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 2, 2011 at 5:06 PM, Tony Anecito <adanecito@xxxxxxxxx> 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-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux