Vary

The Vary HTTP response header describes the parts of the request message aside from the method and URL that influenced the content of the response it occurs in. Most often, this is used to create a cache key when content negotiation is in use.

The same Vary header value should be used on all responses for a given URL, including 304 Not Modified responses and the "default" response.

Header type Response header
Forbidden header name no

Syntax

Vary: *
Vary: <header-name>, <header-name>, ...

Directives

*

Indicates that factors other than request headers influenced the generation of this response. Implies that the response is uncacheable.

<header-name>

A comma-separated list of request header names that could have influenced the generation of this response.

Specifications

Specification
Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content (HTTP/1.1 Semantics and Content)
# header.vary

Browser compatibility

BCD tables only load in the browser

Compatibility notes

See also