Better Browser Caching with No-Vary-Search - CSS Wizardry
Briefly

Better Browser Caching with No-Vary-Search - CSS Wizardry
"No-Vary-Search: an HTTP response header that helps us solve a surprisingly common problem with cache keys in HTTP cache (or browser cache). The short version is, URLs that are materially the same often fail to reuse the same cached response simply because their query strings differ. Sometimes that difference matters to the content and, therefore, the end user. And sometimes, it really doesn't matter at all: The former are very likely different pages, or at least pages that ought to produce different content. We would not want them cached under the same key. The latter should, in almost every sane setup, return the exact same HTML."
"By default, caches are cautious. If the URL differs, the cache key differs, and, in a cautious world, that is usually the right thing to do. This is why: ...should remain distinct. The query parameter materially changes the content of the page. But this also means the cache will usually treat these as distinct pages, too-even if all three return byte-for-byte identical HTML. At best, that means wasted cache space; at worst, it means unnecessary trips across the network because the browser cannot reuse a perfectly good response that it already has stored."
"No-Vary-Search is a response header that tells the cache how to treat query parameters when matching a URL to an existing cache entry. In other words, it lets the server say, via a header, these search parameters do not meaningfully change the response, so do not let them fragment the cache."
No-Vary-Search is an HTTP response header that helps caches reuse stored responses when URLs differ only by search query parameters. Different query strings can cause caches to treat requests as different URLs, creating separate cache entries even when the returned HTML is identical. Some query parameters should remain distinct because they materially change the page content, so they must not be merged. Other query parameters, such as tracking baggage, often do not affect the response and should not fragment the cache. No-Vary-Search instructs caches to ignore specified search parameters for cache key matching, allowing reuse of the same cached response.
Read at Csswizardry
Unable to calculate read time
[
|
]