The Vary 1) HTTP response header specifies header values that should be added to the cache key used by the cache.
A server may serve different contents for desktop or mobile depending on the user-agent header.
If the cache uses only the URL has cache key, a desktop page could be served to a mobile page.
To avoid this situation, you can add the user-agent header in the Vary header to instruct caching servers to add the user agent header to the cache key.
Vary: User-Agent
If you don't want to serve the same page to different users.
Vary: Cookie
The Vary header value should be the same: