THELAST.NEWSBACK TO LATEST
TECHNOLOGY · VERIFIED DEVELOPMENT

Cloudflare Adds Flexible Vary Header Handling to Its CDN

WHY IT MATTERS

By giving CDN operators granular control over Vary, Cloudflare reduces cache fragmentation, improves hit rates, and ensures correct content delivery without sacrificing performance.

What happened

Cloudflare has released a new feature that lets customers control how the Vary response header is treated in its caching layer. The Vary header, which tells intermediaries which request fields may affect a response, has long been a source of cache fragmentation because raw header values can create thousands of distinct cache keys. With the new Cache Rules, available on every plan, site operators can choose how Cloudflare handles each header listed in Vary: normalize the value, pass the exact value through, or bypass the cache entirely. If the origin does not return Vary, the response is cached normally. When Vary is present, Cloudflare applies the configured action per header; headers without a specific setting fall back to the rule’s default. Vary: * always bypasses the cache. This granular control allows sites to keep the correct content for different browsers, languages, or image formats while preventing the cache from becoming cold and inefficient.

PRIMARY SOURCES

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

Cloudflare (company statement) · Alex Krivit · Corporate primary source; facts only, no copied text or images; link and attribution required

By THELAST.NEWS Editorial System · AI-assistedRevision 1Approved independent source