WebPagetest Forums
Leverage browser caching - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: Bugs/Issues (/forumdisplay.php?fid=10)
+--- Thread: Leverage browser caching (/showthread.php?tid=13313)



Leverage browser caching - bondimedical3 - 10-20-2014 06:31 PM

I have ran a test on my website and under the Performance Review tab it says Warning for all of my images in "Leverage browser caching of static assets:" even though there is a time of 24 hours. Why is this?


RE: Leverage browser caching - pmeenan - 10-24-2014 03:07 AM

Do you have a link to the results? Generally it will fail if there is no caching but it will warn if it is < 30 days. My guess is that it is warning because of the relatively short cache time which probably means you're not versioning the resources (changing the actual URL when things change).


RE: Leverage browser caching - bondimedical3 - 10-24-2014 11:03 AM

(10-24-2014 03:07 AM)pmeenan Wrote:  Do you have a link to the results? Generally it will fail if there is no caching but it will warn if it is < 30 days. My guess is that it is warning because of the relatively short cache time which probably means you're not versioning the resources (changing the actual URL when things change).

I have changed the time to 1 month and its passed the test. Thanks for your help.


RE: Leverage browser caching - ishotfirst - 06-24-2015 05:51 AM

I think there is something not quite right about how WPT is checking caching here. The documentation states "An "Expires" header is present (and is not 0 or -1) or a "cache-control: max-age" directive is present and set for an hour or greater. If the expiration is set for less than 30 days you will get a warning (only applies to max-age currently)."

We have a max-age of 7200 for a number of assets, but WPT is complaining about FAILED caching. It it's getting confused by a potentially incorrect expires header, it shouldn't be per https://tools.ietf.org/html/rfc7234#section-5.3.

Given this, I would expect to see warnings for everything given that they're less than 30 days (2 hours in this case), but never a failure (less than 1 hour).


RE: Leverage browser caching - pmeenan - 06-24-2015 11:55 PM

Do you have a link to a test result that I can look at? A failcase will help for debugging the issue.