We just shipped support for the ugliest part of HTTP: Vary – Cloudflare Blog
by thisisfatih on 9/23/2026, 10:03:21 PM
https://blog.cloudflare.com/vary-support/
Comments
by: simonw
I've been wanting this from Cloudflare <i>for years</i>.<p>The classic problem here is if you do that thing where user agents that send "accept: text/html" get HTML, while user agents that don't get JSON or some other format.<p>This used to be impossible to deploy being Cloudflare caching, because they ignored the Vary header on anything other than images - so you risked caching the JSON version and then serving it up to someone who was expecting HTML.<p>(Independent of the Cloudflare feature I ended up deciding never to use that pattern, because I prefer having URL that predictably returns HTML or JSON - I add a .json suffix to my apps to serve JSON instead.)
9/23/2026, 11:14:57 PM
by: bhouston
Nice to see. I’ve used vary to quite a bit of success on CloudFront back in the day.<p>I actually assumed when I started using Cloudflare that it did have vary support and it led to a serious bug in my sass app at the time.
9/23/2026, 11:15:09 PM
by: xyzzy_plugh
I honestly thought they would never ship this. Holy hell this has been a long time coming.<p>Actual real content negotiation in 2026. Never thought I'd live to see the day.
9/23/2026, 11:23:53 PM