Re: General use of rewrite / redirect

From: Date: Wed, 19 Mar 2008 10:11:21 +0000
Subject: Re: General use of rewrite / redirect
References: 1 2 3 4 5 6  Groups: php.general 
Request: Send a blank email to php-general+get-271774@lists.php.net to get a copy of this message
Stut wrote: > On 19 Mar 2008, at 09:54, Per Jessen wrote: >> >> 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. My server does add expire headers - and I still see lots of 304s. I've checked that the expiry information is correct. > 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. Same here - I am just wondering about the need for the conditional GET then. What makes the browser want to revalidate an object when it has a valid (=unexpired) copy cached? /Per Jessen, Zürich

« previous php.general (#271774) next »