Freshness
Directives such as max-age tell a cache how long a stored response may be reused without contacting the origin server again. Shared caches may also receive their own lifetime through directives such as s-maxage.
HTTP caching headers influence whether browsers, proxies, and CDNs may reuse a response, how long that response stays fresh, and what should happen when it becomes stale. Good caching can reduce repeated downloads and server work, but the correct policy depends heavily on the kind of response being served.
A long cache lifetime can be excellent for versioned static assets and completely wrong for personalized HTML. Likewise, no-cache does not mean the same thing as no-store: no-cache allows storage but requires validation before reuse, while no-store asks caches not to store the response.
Core concepts
Caching becomes easier to reason about when freshness, revalidation, and cache scope are treated as separate questions.
Directives such as max-age tell a cache how long a stored response may be reused without contacting the origin server again. Shared caches may also receive their own lifetime through directives such as s-maxage.
ETag and Last-Modified can act as validators. When a stored response becomes stale, the client can ask whether it changed and may receive 304 Not Modified instead of downloading the full response again.
public and private influence where responses may be stored, while Vary tells caches which request-header differences should create separate cache entries. Personalized responses need especially careful treatment.
Key headers
These headers describe the most common pieces of browser and intermediary caching behavior.
The main response header for freshness, revalidation, storage, and cache scope. Its directives can describe very different behavior, so the complete value matters.
Identifies a particular representation of a resource. Clients can send it back with If-None-Match to check whether the cached representation is still current.
Provides a modification timestamp that can be used with conditional requests. It is generally less precise than ETag but remains useful across the HTTP ecosystem.
Tells caches which request headers must differ before a separate cached response is required, such as content negotiated by Accept-Encoding or language.
If you would like to read more about Caching Headers, check out the Knowledge Base for detailed references, configuration guidance, cache troubleshooting, and server-specific examples.
Browse Knowledge BaseCopyright ©2026 MILAN INNOVATIONS LLC. All rights reserved.