Cache-Control

Cache-Control is an HTTP header that tells browsers and CDNs how to cache a response — for how long, and whether they may store it at all. Directives like max-age, public, private, no-cache, and immutable set freshness, control revalidation, and decide how aggressively an asset is reused.

The header is a comma-separated list of directives. max-age=31536000 says "this is fresh for a year." public lets shared caches like a CDN store it; private restricts it to the user's browser. no-cache means a cache may store the response but must revalidate before reuse, while no-store forbids caching entirely — useful for sensitive data.

The immutable directive is a performance gem for versioned assets. Combined with a fingerprinted filename (app.9f3c2.js), Cache-Control: public, max-age=31536000, immutable tells the browser it never even needs to revalidate — the URL changes whenever the content does.

Get this header right and your CDN serves the overwhelming majority of requests from the edge. Get it wrong — too short, or missing entirely — and every request falls through to origin, driving up latency and egress.

Cache-Control: public, max-age=31536000, immutable

Cache-Control interpreter

Paste a Cache-Control response header value to compare browser and shared-cache instructions. This cache control header tool runs in your browser. It does not send or save your input, fetch a URL, or change real headers.

Up to 4096 characters. Response directives only, not complete RFC validation.

Browser cache

If otherwise cacheable, fresh for 31536000 seconds from response generation, not from each request. Existing Age reduces remaining freshness.

Shared cache and CDN

If otherwise cacheable, fresh for 31536000 seconds from response generation, not from each request. Existing Age reduces remaining freshness.

Warnings and limits

  • immutable only applies while fresh. Use versioned or fingerprinted URLs when content changes; it adds no TTL and does not make private data safe to share.

For a cache-control example with separate lifetimes, try max-age=60, s-maxage=300. Browsers ignore s-maxage. Other headers, response status, cache support and CDN rules affect real behavior. These cdn cache control explanations are not a safety verdict or proof that a response will be cached.

Related terms

How cdn22.net fits in

Sensible cache headers are applied to public files on cdn22.net so static assets stay hot at the edge. hosting static website assets.

Get started
cdn22.net
Copyright © 2026
All rights reserved
ContactGuidesGlossaryStatusSecurityLegal