Current time: 10-19-2019, 06:24 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Leverage browser caching
10-20-2014, 06:31 PM
Post: #1
Leverage browser caching
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?
Find all posts by this user
Quote this message in a reply
10-24-2014, 03:07 AM
Post: #2
RE: Leverage browser caching
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).
Visit this user's website Find all posts by this user
Quote this message in a reply
10-24-2014, 11:03 AM
Post: #3
RE: Leverage browser caching
(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.
Find all posts by this user
Quote this message in a reply
06-24-2015, 05:51 AM
Post: #4
RE: Leverage browser caching
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).
Find all posts by this user
Quote this message in a reply
06-24-2015, 11:55 PM
Post: #5
RE: Leverage browser caching
Do you have a link to a test result that I can look at? A failcase will help for debugging the issue.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)