HTTP Vary Header

About

The Vary 1) HTTP response header specifies header values that should be added to the cache key used by the cache.

Usage

Not mixing content for mobile vs desktop

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

Security

If you don't want to serve the same page to different users.

Vary: Cookie

Set

The Vary header value should be the same:





Discover More
HTTP - Cache (Cache-Control Header, Bursting, )

When sending a response, several headers have an influence / control over the cache store, we call them cache control headers The cache control header are: Name Description Cache-Control Define properties...
Http Cache Partitioning Example
HTTP - Cache Store

A cache store is an http cache component that caches the http response if the cache control header permits it. There is two type of cache: intermediate cache (proxy) client cache (user-agent cache...
Chrome Devtool Network 304
How to implement and check a Web / HTTP cache ?

Implementing and verifying that the HTTP cache is set and working properly is not a straightforward task. This article gives you a step by step.
Web - Mobile PDA, Telephone,

When building an desktop/mobile application, this is possible: via the native language of the platform via a WebView: a special browser window that can access device-level APIs. via a language compiled...



Share this page:
Follow us:
Task Runner