Re: General use of rewrite / redirect
| From: | Stut | Date: | Wed, 19 Mar 2008 10:22:17 +0000 |
| Subject: | Re: General use of rewrite / redirect | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-271775@lists.php.net to get a copy of this message | ||
On 19 Mar 2008, at 10:11, Per Jessen wrote:
Stut wrote:We see lots of them as well, but it's far less than before we added far-future expiry headers.On 19 Mar 2008, at 09:54, Per Jessen wrote:My server does add expire headers - and I still see lots of 304s. I've checked that the expiry information is correct.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.
There could be a number of reasons ranging from browser configuration to badly implemented caches. There's not a lot you can do about them beyond making sure your expiry headers are working properly with the major browsers. -Stut -- http://stut.net/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?