1. Home
  2. Glossary
  3. Cache-Control
Server/HTTP

Cache-Control

An HTTP response header that tells browsers and CDNs whether and for how long they may reuse a stored copy of a file. Long cache times for versioned assets make repeat visits faster.

Why it matters

Without clear caching rules browsers either re-download files they already have or keep stale copies. Versioned assets are usually safe to cache for a long time.

Example

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

Where you will see it

The free Compression & caching checker looks at this on a live page and explains what it finds in plain English: test Brotli and gzip compression, browser caching and HTTP/2 or HTTP/3, with server config fixes.

Related terms

  • CDN: A network of servers in many locations that keeps copies of your files and serves each visitor from a nearby one.
  • HTTP header: A name and value pair sent along with a request or a response.
  • Gzip: A widely supported compression format for text responses.

Go deeper

  • Compression & caching: How gzip and Brotli compression and HTTP caching work, which settings to use for HTML, CSS, JavaScript and images, and how to turn them on in Nginx and Apache.

← All 66 glossary terms

↑ ↓ to moveEnter to openEsc to closeAll results