← back to flaviocopes.com

Cache-Control header builder

← All tools

Pick what you are caching — or compose directives manually — and get the header line plus a plain-English explanation of what browsers and CDNs will do.

~~~

Mode

~~~

Output

Header

Browser

CDN / shared cache

Shareable URL keeps your choices. Everything runs in the browser — no requests leave this page.

~~~

About this tool

Cache-Control tells browsers and CDNs how long they may reuse a response. Wrong headers mean stale HTML, broken deploys, or private data sitting on a shared edge cache.

Fingerprinted static assets (hash in the filename) can use long max-age plus immutable. HTML and API responses usually need shorter TTLs or revalidation. Personalized pages need private or no-store.

~~~

Read more