Post

I’ve been working with a client who runs a lot of social media and ad campaigns, so we’ve been deploying the experimental `No-Vary-Search HTTP` header. It’s amazing to see it actually working! Read all about it here: csswizardry.com/2026/05/bett...

csswizardry.comBetter Browser Caching with No-Vary-Search – CSS WizardryNo-Vary-Search lets HTTP caches ignore irrelevant query parameters such as UTM tags, while still keeping meaningful ones like product variants in the cache key.

27 reposts68 likes

Trying to wrap my head around why this impacts browser. Because for advertising campaigns it’s likely an edge you click on 2 links with different utm for the same page? CDN cache it makes sense, but cdns could do this before right? Pretty sure I could do something like this in CF (might be wrong)

It actually came from Speculation Rules initially (we wanted to give the ability to not waste speculations if unimportant params were used). Extending it to the browser’s HTTP Cache is a nice addition. E.g. - Visit home page with UTM params - Visit other page - Click logo to go home (without UTMs)

aaah that visit the same page again but without the prams example makes it click, much more likely than what I was thinking about in terms of two different UTMs. Neat, thanks!

And yes many CDNs have been able to do this, but in non-standard ways. It’s nice to have a standard way for sites to inform any CDN which params matter. No aware of any that have implemented support yet but have spoken to people at some of them who’ve said they are interested in it.

It’s potentially an edge case, yes. And thus far more effective at CDN-level, yes. But in the case of things like ecomm filters and such (?sort, ?filter), having them in different orders could be wasteful. And very-frequently visited URLs (think BBC News homepage), there could be many lines in.

This is a bad example as a news homepage shouldn’t reeeeeally hit HTTP cache very often anyway. But for definite it’s a worthwhile additional layer if you’ve got everything else sorted.

I hit surprising wins with No-Vary-Search on faceted search pages, but only after normalizing param order server side. Otherwise cache hit rate looked random because semantically identical URLs stayed distinct.