Skip to content

Commit 8b3db0a

Browse files
committed
Improved wording
1 parent 7cf6511 commit 8b3db0a

1 file changed

Lines changed: 21 additions & 25 deletions

File tree

_posts/2026-05-07-better-browser-caching-with-no-vary-search.md

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -242,16 +242,15 @@ something like this before:
242242
* `/?test`
243243
* `/?asdf`
244244

245-
Ordinarily, that gives us a different URL and therefore a different cache key.
246-
But if the main document is using `No-Vary-Search`, that assumption may no
247-
longer hold. Appending search params may not bypass cache for this document
248-
because the cache has explicitly been told those parameters do not matter.
245+
Usually, that gives us a different URL and therefore a different cache key. But
246+
if the main document is using `No-Vary-Search`, that assumption may no longer
247+
hold. Appending search params may not bypass cache for this document because the
248+
cache has explicitly been told those parameters do not matter.
249249

250-
Honestly, I would love DevTools to surface this more clearly. Something akin to
251-
the existing ⚠️ iconography in the _Network_ panel’s title, would be really
252-
helpful here: not because anything is wrong per se, but because the browser may
253-
be doing something surprising unless you know to look for the `No-Vary-Search`
254-
header.
250+
Honestly, I would love DevTools to surface this more clearly. Something like the
251+
existing ⚠️ iconography in the _Network_ panel’s title would be really helpful
252+
here: not because anything is wrong per se, but because the browser may be doing
253+
something surprising unless you know to look for the `No-Vary-Search` header.
255254

256255
## Use It Carefully
257256

@@ -268,25 +267,22 @@ This means `No-Vary-Search` is best suited to parameters that are:
268267

269268
If a parameter affects the HTML, do not ignore it.
270269

271-
It is also worth noting that, as of **7 May 2026**, this is still an
272-
experimental feature and support is not yet universal, so I would treat it as a
273-
progressive enhancement rather than a foundational part of your caching
274-
strategy.
270+
It’s also worth noting that, at the time of writing, this is still an
271+
experimental feature and support is not yet universal, so I would treat it as
272+
a progressive enhancement rather than a foundational part of your caching
273+
strategy. That’s exactly what I’ve done with my site for now.
275274

276275
## A Nice Fit for Messy Real-World URLs
277276

278277
What I like about `No-Vary-Search` is that it acknowledges how the web actually
279-
works.
278+
works. URLs pick up baggage: marketing tags get appended, tracking parameters
279+
are added, client-side state makes its way into the address bar. Two URLs that
280+
are materially the same page often arrive looking totally different.
280281

281-
URLs pick up baggage. Marketing tags get appended. Tracking parameters get
282-
added. Client-side state leaks into the address bar. Two URLs that are
283-
materially the same page often arrive wearing different coats.
282+
Historically, caches had to treat those as entirely separate keys, but
283+
`No-Vary-Search` gives us a way to be a little more deliberate. If the response
284+
is the same, we can say so. And if only certain parameters matter, we can say
285+
that, too.
284286

285-
Historically, caches had to treat those as entirely separate keys.
286-
287-
`No-Vary-Search` gives us a way to be a little more honest. If the response is
288-
the same, we can say so. And if only certain parameters matter, we can say that
289-
too.
290-
291-
For teams who care about getting more out of HTTP cache, that is a very welcome
292-
addition.
287+
For teams who care about getting more out of the HTTP cache, that is a very welcome
288+
addition!

0 commit comments

Comments
 (0)