Vary Header Explained
What the HTTP Vary header does and when it's used.
Published October 17, 2026
The Vary header tells caches which request headers affect the response, so they know when a cached copy is no longer valid.
Key points
- "Vary: Accept-Encoding" means the cache must store a separate copy per encoding a client requested