Accelerated Domains – Vary Headers Caching


Introduction


With Servebolt Optimizer 3.6.1, we have introduced Vary Headers Caching!

This feature allows Accelerated Domains to build separate cache entries based on specific client headers. In practice, this means visitors can receive content that is more tailored to them, while you still maintain full edge caching performance.

The configuration is visible via the vary_headers key @ https://yoursite.com/acd-cgi/config

Available Cache Variations

You can now vary cache based on:

  • User-Agent
    • Splits cache between Mobile, Tablet, and Desktop.
  • Language (Accept-Language)
    • Uses the visitor’s primary browser language.
  • Origin Country (X-Origin-Country)
    • Uses the visitor’s detected country.

To adjust which header is gonna be used as Cache keys. Enable these within:

Servebolt Optimizer → Cache → Cache Settings

(Visible only when Accelerated Domains is enabled for the site)

Deliver Personalized Content at Full Edge Speed

Instead of bypassing cache to detect language, device, or location dynamically in WordPress or PHP, content is cached correctly at the edge from the start.

You keep sub-second TTFB while serving device-specific, language-specific, or geo-specific versions.

For example:

  • Mobile users receive mobile-optimized markup
  • Norwegian users receive Norwegian content
  • UK visitors see UK-specific pricing or content

All without cache fragmentation issues.

Avoid Complex Application Logic

Without header-based cache variation, many sites:

  • Disable caching for multilingual pages
  • Use cookies to control content
  • Add custom bypass rules
  • Increase backend load

With Vary Headers Caching:

  • No custom cache rules required
  • No cookie-based cache fragmentation
  • No performance penalty from PHP rendering per request

This simplifies architecture and reduces operational risk.

Higher Cache Hit Ratio Compared to Traditional Methods

Traditional geo or language detection often forces dynamic rendering.

With Vary Headers Caching:

  • Each variation is still cached
  • Cloudflare serves correct variants directly
  • Origin server load remains minimal

This is particularly valuable for:

  • Marketing pages with regional variations
  • WooCommerce stores with country-specific pricing
  • Multilingual sites
  • Sites with device-specific layouts