On 19 Mar 2008, at 09:54, Per Jessen wrote:
Larry Garfield wrote:
True, but bear in mind that the browser has to make a HEAD request
for
every such file in order to determine if it needs to download it
again. That's a non-small amount of HTTP traffic if you have a lot
of
images or CSS files.
True - although I rarely see HEAD requests. I see lots of conditional
GETs instead.
BTW, why does the browser do this for objects it has already cached?
(assuming they're fresh/not expired)
Because by default most web servers don't add expiry headers, so it's
up to the browser.
Adding expiry headers for certain content types is very easy in most
web servers and depending on traffic patterns it can cause a very
healthy drop in traffic. Combine that with a convention for new
versions of the files as they get changed and you can put the expiry
date a long time into the future. We use a year on all our images, css
and js files and it's lead to a drop of ~40% in traffic to the static
servers.
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php