Hasty Briefsbeta

Bilingual

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

3 hours ago
  • Cloudflare now supports the Vary response header in Cache Rules on all plans.
  • Vary tells caches which request headers may affect the response, but caches must decide which differences actually matter.
  • High-cardinality variations can fragment caches, reducing hit ratios and increasing origin load.
  • Cloudflare offers three actions for each Vary header: normalize, passthrough, and bypass.
  • Normalize is recommended for negotiation headers to collapse equivalent requests into shared cache entries.
  • Passthrough preserves exact header values for cases where small differences change the response.
  • Bypass is used for personalized or unpredictable headers, preventing the response from being cached.
  • Configuration is available via dashboard, Rulesets API, and Terraform.
  • Custom cache keys apply to all responses, while Vary is response-driven and more precise.
  • The feature is available on Free, Pro, Business, and Enterprise plans.