Free auditStart free
GlossaryGlossary · Performance

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.

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 withChatGPTClaudePerplexityGoogleAI Mode

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
01Explained

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. MDN warns that a shared cache stores one response and reuses it for multiple users, so personalized content must not end up there.

02At 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
04Checklist

What Google's crawlers do with it

Google's crawler documentation says its infrastructure supports heuristic 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. 01If 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. 02The Last-Modified date must follow the HTTP date format, for example "Fri, 4 Sep 1998 19:15:56 GMT".
  3. 03Google 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. 04Googlebot uses caching when re-crawling for Search, but Google says individual crawlers may or may not use it.

Conditional requests with ETag and If-None-Match are the part Google supports. For large sites where 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.

05Check 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. 01MDN: Cache-Control headerdeveloper.mozilla.org · checked 2026-10-25
  2. 02RFC 9111: HTTP Cachingrfc-editor.org · checked 2026-10-25
  3. 03web.dev: Prevent unnecessary network requests with the HTTP Cacheweb.dev · checked 2026-10-25
  4. 04Google Search Central: Overview of Google crawlers and fetchers (HTTP caching)developers.google.com · checked 2026-10-25
Questions

Asked a lot.

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

01What 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.

02What 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.

03Does 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.

04How 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.

Free · 2 minutes

Know the term. Now check your site.

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

Free, no card60 secondsNobody will call you
  • 46 fixes shipped without a ticket Brightpipe
  • +212% organic clicks in 90 days Ledgerly