Analyze HTTP cache headers
Copy the response headers for a request from the Network tab in your browser’s developer tools. You can also use the output of curl -I for an endpoint that handles HEAD and GET consistently. Paste one header per line. The HTTP status line is optional. If the text includes a chain of HTTP responses, the analyzer uses the last response. The text is processed in your browser.
Compare browser and CDN cache lifetimes
With Cache-Control: public, max-age=300, s-maxage=3600, the browser has a freshness lifetime of five minutes. A shared cache, such as a CDN or proxy, gets one hour because s-maxage takes precedence there. When neither age directive applies, the analyzer uses the difference between Expires and Date, if available.
A lifetime is measured from the response’s origin, so it can already be partly used up when the response reaches you. Check Age for the age reported by an upstream cache. The headers describe a caching policy. To confirm a hit or miss, check your CDN’s response headers or logs. The request method, response status, authorization, and CDN configuration can also affect storage.
Understand storage and revalidation
no-store tells caches to avoid storing the response. private limits storage to a user’s own cache. no-cache calls for a check before reuse. Caches can use ETag or Last-Modified to make that check with a conditional request. If the content is unchanged, the server can return 304 Not Modified. When private or no-cache names fields in quotes, caches that support this form can omit those fields. The analyzer describes the response with all fields included.
Vary tells caches which request headers distinguish variants of a response. For example, Vary: Accept-Encoding separates responses by the client’s accepted encodings. Vary: * prevents a stored response from matching a later request by header values. See MDN’s HTTP caching guide and RFC 9111.