The Vary HTTP header is used by servers to indicate that the response can differ based on specific request headers. It tells caches (like browsers, proxy servers, or CDNs) to take certain request headers into account when deciding whether to reuse a cached response for subsequent requests.
Common Use Cases
Content Negotiation: For example, when serving different content based on:
- Accept-Encoding (compressed vs. uncompressed content like gzip or br).
- Accept-Language (language-specific content like en-US or fr-FR).
- User-Agent (different versions for mobile vs. desktop).
Customization: Serving personalized content based on headers like Authorization or Cookie.
Commonly Used Keys in the Vary Header
User-Agent, Accept-Encoding, Cookie,- First commit to issue fork.
- 🇧🇪Belgium dieterholvoet Brussels
I improved the documentation in the setting description a little bit, but I don't think we need to go too crazy there. Google exists for a reason :)
-
dieterholvoet →
committed a83f5251 on 8.x-2.x
Issue #3195743 by dieterholvoet: Improve documentation on how to create...
-
dieterholvoet →
committed a83f5251 on 8.x-2.x
Automatically closed - issue fixed for 2 weeks with no activity.