Cache header checker
Cache-Control, ETag, Age, and Vary headers — which CDN is answering, how long the edge may hold the response, and what is quietly stopping it from being cached.Sends one GET request from our server and reads the response headers. Public URLs only — private and reserved addresses are refused.
How to read a caching response
Four headers decide almost everything about whether a response is served from an edge or from your origin. Cache-Control sets the rules, Age reports how long a shared cache has already held the copy you received, ETag or Last-Modified decide how cheaply a stale copy can be refreshed, and Vary decides how many separate copies the cache has to keep.
The most common failure is not an aggressive policy or a conservative one — it is a contradiction. A long s-maxage next to a Set-Cookie, or a compressed body with no Vary: Accept-Encoding, produces a response most CDNs refuse to store at all. The result looks like a caching configuration and behaves like no caching, which is why it survives so long in production unnoticed.
What the checker looks for
Every finding is a property of the response itself, not of any particular provider: shared cache lifetime and whether it is long enough to be worth anything, whether stale-while-revalidate lets the edge answer instantly while it refreshes, whether a validator exists so an expiry costs headers instead of the whole body, whether Vary is fragmenting the cache, and whether cookies or a missing encoding declaration make the response uncacheable in practice.
Once you know your cache hit ratio, the CDN cost calculator turns it into a number: every point of hit ratio is a point of origin egress you stop paying for. If the response you are checking is an error rather than a cache problem, the HTTP status code reference covers what each code means at the edge.
Frequently asked questions
- What does this cache header checker actually do?
- It sends a single GET request to the URL you enter from our server, follows any redirects, and reads the response headers. It then explains what each caching header does in practice — how long a shared cache may store the response, whether it can be revalidated cheaply, and whether anything in the response quietly prevents caching altogether.
- What is the difference between max-age and s-maxage?
- max-age sets how long any cache may treat the response as fresh, including the visitor's browser. s-maxage applies only to shared caches such as a CDN, and overrides max-age for them. Splitting the two is what lets you cache aggressively at the edge while keeping browser copies short-lived, which matters because you can purge a CDN but you cannot purge a browser.
- Why does my page show no cache headers?
- Many application frameworks send no Cache-Control at all, which leaves caching to heuristics: a shared cache may guess a lifetime, commonly around 10% of the time since Last-Modified. The result is that your cache lifetime is decided by whichever CDN or proxy is in front of you rather than by you, and it varies between them. Setting an explicit Cache-Control is almost always better than relying on the guess.
- Why is Vary: User-Agent bad for caching?
- A cache stores a separate copy of the response for every distinct value of each header named in Vary. Because there are effectively unlimited User-Agent strings in the wild, varying on it produces a near-unique cache entry per visitor and the hit ratio collapses towards zero. If you need device-specific responses, vary on a normalised device-class header that your CDN sets instead.
- Can I check a URL on localhost or a private network?
- No. The check runs from our server, so it can only reach publicly routable addresses, and requests to loopback, link-local, and RFC 1918 private ranges are refused deliberately. To inspect a local service, run curl -I against it from your own machine instead.
- Does checking a URL affect my cache hit ratio?
- It sends exactly one request, so the effect is a single entry in your logs and at most one cache miss. It will not warm your cache in any meaningful way and it will not skew hit-ratio metrics at any real traffic volume.