Skip to content
RU
← All HTTP Headers
Caching

Vary

Tells caches which request headers to consider when deciding whether to serve a cached response.

Syntax

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

Example

Vary: Accept-Encoding, Accept-Language

Description

Vary tells caches which request headers affect the response. Different header values need separate cached versions.

Common values: Accept-Encoding, Accept-Language, Cookie.

Careful with Vary: Cookie or Vary: * — these effectively disable CDN caching.

How real sites send this header

Home-page responses of 503 popular sites from the enterno.io /check catalogue, checked in the last 30 days.

69.4% (349 of 503) send Vary.

Most common values:

  • Accept-Encoding — 229 sites
  • rsc, next-router-state-tree, next-router-prefetch, next-rou… — 25 sites
  • Accept-Encoding,Cookie — 8 sites

See it on: yandex.ru, discord.com, github.com, habr.com, cloudflare.com

Check if your website sends this header correctly

Check your headers →

Related Articles

Related Headers

Related guides

Longer-form reading on this topic from the knowledge base.

Automate this check

Set up continuous monitoring and get an alert when something breaks. No manual runs to remember.