We just shipped support for the ugliest part of HTTP: Vary

Cloudflare just added flexible Vary support, letting sites control how caching handles header variations for better performance.

We just shipped support for the ugliest part of HTTP: Vary

Why Now

Cloudflare released new Cache Rules that let customers decide how to treat Vary headers, a long‑standing pain point in HTTP caching.

What Happened

The Vary header tells caches which request headers affect the response. Cloudflare’s new feature lets users normalize, pass through, or bypass cache for each header. It’s available on all plans via Cache Rules.

Why It Matters

This gives sites fine‑grained control over cache hit rates and content correctness, reducing cache fragmentation while preventing wrong content delivery. It can improve performance for multi‑format or localized content.

The Limitation

The feature relies on correct Vary declarations from the origin; misconfigured headers can still cause cache misses or incorrect responses.

What You Can Do

Configure Cache Rules to handle Vary headers for your site, choosing normalization or bypass as needed.

Source

Read original source

Why we picked this

Technical article about HTTP Vary support, relevant to web dev but only tangential AI.

← Back to all articles