MyBB Internal: One or more warnings occured. Please contact your administrator for assistance.
WebPagetest Forums - Is the content caching or not?

WebPagetest Forums

Full Version: Is the content caching or not?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
test result: http://www.webpagetest.org/result/120509_2R_49HKD/

I'm getting an 'A' for caching static content, but then the detailed view of the second pass is showing that loads of the content hasn't cached: http://www.webpagetest.org/result/120509...ls/cached/

is this down to the fact that there's a version applied at the end of the file name (ie http://d1yvubuvg1uugl.cloudfront.net/wp-...20120110)?

The version number doesn't change from first to second pass, so surely that shouldn't make a difference?

Finally... any idea what causes these version numbers to be applied at a server level and how they can be turned off?

Any help much appreciated, thanks in advance.
WebPagetest isn't checking for the cache-control: must-revalidate header which your requests have. That's basically breaking the caching and forcing the browser to do an if-modified check for all of them.

Why would you want to turn the version numbers off? That is what makes the resources cacheable. Since you're on wordpress I'm assuming it's being done by a plugin like W3 Total Cache.
(05-09-2012 11:06 PM)pmeenan Wrote: [ -> ]WebPagetest isn't checking for the cache-control: must-revalidate header which your requests have. That's basically breaking the caching and forcing the browser to do an if-modified check for all of them.

Why would you want to turn the version numbers off? That is what makes the resources cacheable. Since you're on wordpress I'm assuming it's being done by a plugin like W3 Total Cache.

Thanks for the reply Patrick.

So essentially the must-revalidate makes the browser check the asset to see that it hasn't changed, and then only downloads it if it has... but the point is, none of the assets have changed between first and second pass, so why would so many of them need to be downloaded again?

You're correct I am using w3 total cache, but i'm not using that to add versions to the files, i have that option switched off in the settings.
It looks very much like "browser caching" is enabled in W3 Total Cache because those are the default set of headers they use.

What you really want is for the browser to never even check to see if the resources have changed and always use the local copy immediately. When you have the version number on the resources then the version number changes only when the resource changes (and it becomes a new URL which the browser will fetch).

You want to avoid the browser checking for the resource at all because that takes just as long as downloading the resource in most cases.
ok sounds like i need to set these headers myself rather than rely on the plugin. thanks Patrick.
The plugin has a few options for the headers in the "browser caching" section - you just need to change the selection to "cache (public)" and you should be set (don't do it for the html, just images, js and css).
Reference URL's