Re: [users@httpd] Image caching / Expiry times / 304s

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

 



On 6/6/06, Matthew Claridge <mclaridge@xxxxxxxxxxxxx> wrote:
Hi all,

I'm not sure if this is possible, because to me sending 304s is just
"how it all works"!.......however, my boss is looking for ways to
prevent a browser continually requesting images from our apache server -
these requests inevitably receive a 304 response and the thinking behind
this is that this is just a waste of resources on an already very busy
server.

We've looked into mod_expiry, but this doesn't really work, because as
soon as the expiry time is reached the browser starts requesting it
again and a new expiry is never set until the server actually sends the
image, so we can make this work with huge expiry times, but thats just
not practical as it means the images are never requested even if we've
changed them.

Two issues here:

1. The server should indeed be updating the Expires and Cache-Control
headers even on 304 responses.  See RFC2616 section 10.3.5.  If it is
not doing that, it is a bug.  (It may also be a bug in the client that
ignores the updated Cache-Control.)

2. A good practice is to set very-long expire (Cache-Control: max-age)
headers on your images and then *never* change them.  If you need to
update the content, use a different filename.  Of course, I believe
most browsers and caches tend to ignore expiry dates more than a day
or so in the future anyway.

Joshua.

---------------------------------------------------------------------
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