0

I am testing my webpage with webpagetest.org

On my page, there are a bunch of images. I can see them well cached in the repeated run: (304 response is marked as yellow in WebPageTest waterfall result) enter image description here

However, in cache static content, there's no check on those resources enter image description here

I found the difference is that those scripts and styles have cache-control: max-age=2592000, while those media resources have cache-control: max-age=0 in the server response. Does it mean that WebPageTest will neglect these responses with max-age=0 in static cache checking?

sdym
  • 218
  • 2
  • 16

1 Answers1

1

Does it mean that WebPageTest will neglect these responses with max-age=0 in static cache checking?

The documentation states that resources which include a specific indication of non-cacheability will not be subject to the 'Cache Static' check:

Applicable Objects

Any non-html object with a mime type of "text/*", "*javascript*" or "image/*" that does not explicitly have an Expires header of 0 or -1, a cache-control header of "private", "no-store" or "no-cache" or a pragma header of "no-cache"

While max-age=0 isn't included in that list, it should be treated the same as no-cache, and is likely being treated the same here and excluding those objects from this check.

Joe
  • 29,416
  • 12
  • 68
  • 88
  • Thanks a lot! I found the document you mentioned in the glossary section which I always skips. – sdym Jun 08 '21 at 01:42