Vary
The "Vary" header field in a response describes what parts of a request message might influence the origin server's process for selecting and representing this response.
Writing responses (servers)
List all headers that affect the contents of the response message body. These headers include:
Remember to include headers that weren't in the request, but would have affected the response if they were.
Do not include connection headers that negotiate protocol details (such as TE
). These will be listed by the client in the Connection header.
Reading responses (clients)
The Vary header is used for computing caching keys, see caching instructions for more information.
Overview table
- Name
- Vary
- Description
- Lists headers that affect the response.
- Direction
- Response
- Specification
- RFC 9110: HTTP Semantics §13.1. Vary
Syntax
Vary = "*" / 1#field-name
History
- 1999-06: RFC 2616 §14.44. Vary
- 2014-06: RFC 7231 §7.1.4. Vary
- 2022-06: RFC 9110 §12.5.5. Vary