Vary
A response header telling caches which request headers affect the response.
Overview
A response header telling caches which request headers affect the response.
Compression, caching, CORS, cookies and security policy headers.
This term appears across 7 tools in the HTTP / Web category. Use the examples and checks below to see how it behaves in practice.
Where you see it
Vary: Accept-Encoding tells caches to key on the header.
Compression CheckerComparing responses shows whether negotiation works and whether the Vary header protects shared caches from serving the wrong variant.
Content NegotiationThis tool sends three requests and compares status, content type, language, encoding and Vary.
Content NegotiationPair reflection with an allowlist, and send Vary: Origin so caches do not mix responses.
CORS Checker
Examples
Try a live check with https://example.com using Content Negotiation.
Content NegotiationHow to use it
- Open Content Negotiation and run it against a real target such as https://example.com.
- Compare the raw answer with the definition and the example above; do not rely on the summary alone.
- If the answer differs, use the troubleshooting checks below and confirm with a second source before changing anything.
What to watch for
- Vary can be cached for its TTL, so a change may look missing until caches expire; compare the record's TTL with the age of the answer.
- Cookie scope is set by Domain, Path, SameSite and Secure; a broad Domain makes Vary first-party across every subdomain.
- A result applies only to the exact target, configuration and scope you tested; check sibling names, hosts or paths separately.
Why it matters
Compression, caching, CORS, cookies and security policy headers.
7 tools use this term
HTTP / WebWhere to check it
Use Domain Expiry Checker, HTTP Header Reference, Drop-Catch Timeline, Content Negotiation, Compression Checker, Cache Control Checker, CORS Checker to inspect it directly. Each tool shows the raw result and its limitations.
HTTP / WebCommon problems and fixes
What does Vary: Accept-Encoding prevent?
A cache serving a Brotli body to a client that only understands gzip, or vice versa. Without it, shared caches can mix incompatible responses.
From Compression CheckerIs a missing Vary fatal?
It can cause a shared cache to serve the wrong language or encoding.
From Content NegotiationIs reflecting Origin unsafe?
It is unsafe if the endpoint also allows credentials or exposes sensitive data, because any site can then read it. Use an allowlist and Vary: Origin.
From CORS CheckerBlocked or filtered: compare a public resolver and check firewall, proxy and content-filter rules.
An old value persists: wait for the TTL to expire, then query the authoritative server directly.
Used in these tools
7 toolsStandards and references
Frequently asked questions
What is Vary?+
A response header telling caches which request headers affect the response.
How do I check Vary?+
Use Domain Expiry Checker, HTTP Header Reference, Drop-Catch Timeline, Content Negotiation, Compression Checker, Cache Control Checker, CORS Checker to inspect it directly. Each tool shows the raw result and its limitations.
Why does Vary matter?+
It affects how HTTP / Web results are read. Compression, caching, CORS, cookies and security policy headers.
What is a common mistake?+
Caching without Vary. A shared cache can serve the wrong language or encoding for Vary.
How this page is written
Definitions are compiled from the 244 tool pages, checked against the standards below, and reviewed by Steve. Each term links to the tools where it is used.


