field Registered
Verified 2026-09-18 · registry updated 2026-08-28

Vary Header

Declares which request fields influenced the selected response representation.

Use Vary when content or CORS responses differ based on request headers so caches do not serve one variant to another request.

httpcachecorsheader

Reference (http)

Vary: Accept-Encoding, Origin

Use Vary when content or CORS responses differ based on request headers so caches do not serve one variant to another request.

Common mistakes

  • Omitting Vary: Origin when Access-Control-Allow-Origin changes by requesting origin.

IANA registry: http-fields/field-names

Registry reference: RFC 9110, Section 12.5.5: HTTP Semantics

Permalink: https://merginit.com/reference/http/vary