# Cache-Control

> Cache-Control is the HTTP header that tells browsers and CDNs how to store a response. See each directive, values for assets and HTML, and what Googlebot honors.

Canonical: https://scaplet.com/glossary/cache-control

Glossary Glossary · Performance

Cache-Control is the HTTP header that tells browsers and CDNs how to store a response. See each directive, values for assets and HTML, and what Googlebot honors.

4 min

read

4

sources

Oct 21, 2026

updated

Scaplet Editorial Team

author

In one line

Cache-Control is an HTTP header that holds directives controlling how browsers and shared caches such as proxies and CDNs store and reuse a response. The two you will use most are max-age, which sets how many seconds a response stays fresh, and no-store, which tells caches not to keep it at all.

30-second check

## Is this costing your site traffic?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?

Summarize this page with [ChatGPT](https://chatgpt.com/?hints=search&q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fcache-control%20(%22Cache-Control%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Claude](https://claude.ai/new?q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fcache-control%20(%22Cache-Control%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Perplexity](https://www.perplexity.ai/search?q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fcache-control%20(%22Cache-Control%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [![Google](/logos/ai/google-color.svg)AI Mode](https://www.google.com/search?udm=50&q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fcache-control%20(%22Cache-Control%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.)

## At a glance

4 facts from the sources below

Request and response

Header type

RFC 9111 (HTTP Caching)

Defined in

max-age=31536000 on versioned URLs

Static assets

ETag and Last-Modified; max-age only as a recrawl hint

Googlebot honors

_01_Explained

## What Cache-Control does

MDN describes Cache-Control as the header that holds directives in both requests and responses that control caching in browsers and shared caches such as proxies and CDNs. On a response it answers three questions: may this be stored, by whom, and for how long it can be reused without asking the server.

A private cache is the one in the visitor's browser. A shared cache sits between your server and many visitors, such as a [CDN](/glossary/cdn). MDN warns that a shared cache stores one response and reuses it for multiple users, so personalized content must not end up there.

_02_At a glance

## The directives that matter

Directive

### `max-age=N`

What it means (per MDN)

The response stays fresh until N seconds after it was generated on the origin

Typical use

Versioned static files

Directive

### `s-maxage=N`

What it means (per MDN)

Freshness for shared caches only. It overrides `max-age` there and is ignored by private caches

Typical use

Let the CDN keep a page longer than browsers do

Directive

### `no-cache`

What it means (per MDN)

The response may be stored, but must be validated with the origin before each reuse

Typical use

HTML that must always be checked

Directive

### `no-store`

What it means (per MDN)

No cache of any kind, private or shared, should store the response

Typical use

Account pages and sensitive data

Directive

### `private`

What it means (per MDN)

Stored only in a private cache such as a browser

Typical use

Logged-in, cookie-based content

Directive

### `public`

What it means (per MDN)

May be stored in a shared cache, including responses to requests with an `Authorization` header

Typical use

Rarely needed unless auth is involved

Directive

### `immutable`

What it means (per MDN)

The response will not be updated while it is fresh, so reloads need not revalidate

Typical use

Fingerprinted files with a long `max-age`

Directive

### `stale-while-revalidate=N`

What it means (per MDN)

A cache may reuse a stale response for N seconds while it revalidates in the background

Typical use

Hide revalidation latency

**no-cache does not mean don't cache**MDN says `no-cache` allows caches to store a response but requires them to revalidate it before reuse. If you want "don't store", use `no-store`.

_03_At a glance

## What to send for each kind of file

Resource

### JS, CSS and images with a hash or version in the filename

Header

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

Why

web.dev advises `max-age=31536000` for URLs whose contents never change. A new version gets a new URL

Resource

### HTML pages that change

Header

`Cache-Control: no-cache` plus an `ETag`

Why

The browser revalidates each time, and a 304 response skips re-sending the body

Resource

### Personalized or logged-in pages

Header

`Cache-Control: private` or `no-store`

Why

MDN says forgetting `private` can leak personal information via a shared cache

Resource

### Responses that must never be kept

Header

`Cache-Control: no-store`

Why

RFC 9111 says a cache MUST NOT store any part of the request or the response

The reason versioned URLs work: web.dev points out that you can't tell browsers to drop a stale cached copy of a file you told them to keep for a year. Changing the URL, usually by embedding a fingerprint in the filename, forces a fresh download.

_04_Checklist

## What Google's crawlers do with it

[Google's crawler](/ai-crawlers/googlebot) documentation says its infrastructure supports heuristic [HTTP caching](/glossary/http-caching) through `ETag` with `If-None-Match`, and `Last-Modified` with `If-Modified-Since`. It states: "Other HTTP caching directives aren't supported." Google's crawlers therefore do not support directives such as `no-store` or `s-maxage`, though they still affect browsers and CDNs.

1. 01 If both `ETag` and `Last-Modified` are present, Google's crawlers use the `ETag`, and Google recommends it because it has no date formatting issues.
2. 02 The `Last-Modified` date must follow the HTTP date format, for example "Fri, 4 Sep 1998 19:15:56 GMT".
3. 03 Google says that while not required, setting `max-age` to the number of seconds content is expected to stay unchanged can help crawlers decide when to recrawl a URL.
4. 04 Googlebot uses caching when re-crawling for Search, but Google says individual crawlers may or may not use it.

[Conditional requests](/glossary/etag) with `ETag` and `If-None-Match` are the part Google supports. For large sites where [crawl budget](/glossary/crawl-budget) matters, set `ETag` correctly, consider a `max-age` that matches how long the content stays unchanged, and leave the rest of your `Cache-Control` tuning to browsers and your CDN.

_05_Check it

## Check it in 2 minutes

Look at one HTML URL and one fingerprinted asset. An `Age` header means a cache between you and the origin served the response, and a CDN setting can add or override `Cache-Control`, so test the public URL, not the origin.

Inspect caching headers

```
curl -sI https://example.com/ | grep -i -E "cache-control|etag|last-modified|age|expires" curl -sI https://example.com/assets/app.3f9c1b.js | grep -i -E "cache-control|etag|age"
```

Sources · 4

## Every fact, linked and dated.

Official docs first. The date is when we last opened each page.

- mozilla.org
- rfc-editor.org
- web.dev
- google.com

1. 01 [MDN: Cache-Control header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Cache-Control) developer.mozilla.org · checked 2026-10-25
2. 02 [RFC 9111: HTTP Caching](https://www.rfc-editor.org/rfc/rfc9111) rfc-editor.org · checked 2026-10-25
3. 03 [web.dev: Prevent unnecessary network requests with the HTTP Cache](https://web.dev/articles/http-cache) web.dev · checked 2026-10-25
4. 04 [Google Search Central: Overview of Google crawlers and fetchers (HTTP caching)](https://developers.google.com/crawling/docs/crawlers-fetchers/overview-google-crawlers) developers.google.com · checked 2026-10-25

Questions

## Asked a lot.

4 questions people ask next, answered from the sources on this page.

_01_ What is the difference between no-cache and no-store?

no-cache lets caches store the response but forces them to validate it with the origin before reuse. no-store tells caches of any kind not to store it. Use no-store when the content must not be kept.

_02_ What max-age should I use?

For files whose URLs change when their content changes, web.dev recommends max-age=31536000, which is one year. For HTML and unversioned URLs, web.dev suggests no-cache with an ETag so the browser revalidates.

_03_ Does Googlebot respect Cache-Control?

Only partly. Google says its crawlers support ETag and Last-Modified for caching, and that other HTTP caching directives aren't supported. It also says setting max-age, while not required, can help crawlers decide when to recrawl a URL.

_04_ How can I view my HTTP headers?

Run curl -I against the URL, or open your browser's DevTools, choose the Network tab, click the request and read the response headers.

## Keep learning

[All glossary](/glossary)

[Learn HTTP caching Performance](/glossary/http-caching) [Related CDN Performance](/glossary/cdn) [Read next Edge caching Performance](/glossary/edge-caching) [Do Run a free site audit Free, about two minutes](/site-audit)

Nearby in glossary
[Burn rate](/glossary/burn-rate) [CAC payback](/glossary/cac-payback) [cache: search operator](/glossary/cache-search-operator) [Canonical HTTP header](/glossary/canonical-http-header)

More in Performance
[Speed Index](/glossary/speed-index) [SVG](/glossary/svg) [Synthetic monitoring](/glossary/synthetic-monitoring) [Time to First Byte (TTFB)](/glossary/time-to-first-byte) [Time to Interactive (TTI)](/glossary/time-to-interactive) [Total Blocking Time (TBT)](/glossary/total-blocking-time) [TTL (time to live)](/glossary/ttl) [Viewport meta tag](/glossary/viewport-meta-tag) [WebP](/glossary/webp) [AVIF](/glossary/avif) [bfcache (back/forward cache)](/glossary/bfcache) [Brotli compression](/glossary/brotli-compression) [Cache-Control](/glossary/cache-control) [CDN](/glossary/cdn) [Chrome UX Report (CrUX)](/glossary/chrome-ux-report) [Content Security Policy](/glossary/content-security-policy) [Content-Length (HTTP header)](/glossary/content-length) [Core Web Vitals](/glossary/core-web-vitals) [Core Web Vitals report](/glossary/core-web-vitals-report) [CORS](/glossary/cors) [Critical CSS](/glossary/critical-css) [Critical rendering path](/glossary/critical-rendering-path) [Cumulative Layout Shift (CLS)](/glossary/cumulative-layout-shift) [dns-prefetch](/glossary/dns-prefetch)

Terms on this page
[CDN](/glossary/cdn) [HTTP caching](/glossary/http-caching) [Crawl budget](/glossary/crawl-budget) [ETag](/glossary/etag)

Free · 2 minutes

## Know the term. _Now check your site._

The free audit reads robots.txt, sitemaps, status codes, canonicals, redirects and structured data.

[Audit my site free](/site-audit)

Free, no card 60 seconds Nobody will call you

- **46** fixes shipped without a ticket Brightpipe
- **+212%** organic clicks in 90 days Ledgerly
