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 sitesrsc, next-router-state-tree, next-router-prefetch, next-rou…— 25 sitesAccept-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 →