Skip to content

Glossary Cache

What Is a Cache?

Definition

A cache is a store of copies. On the web, it keeps the response to a request, such as an image, a stylesheet or a whole page, and reuses it for later requests instead of asking the server again. Pages load faster as a result, and the server does less work.

On this page 5
  1. What cache means
  2. How it works
  3. Why it matters
  4. Best practices
  5. Common mistakes
In brief

A cache stores copies of web resources for reuse: types, the headers that control it and its effect on page speed and crawling.

What cache means

The word covers several related things. MDN distinguishes two kinds of HTTP cache. A private cache belongs to a single client, usually the browser, and can store responses personalised for that person. A shared cache sits between the client and the server, for example in a CDN or a proxy, and stores responses that can be served to many users.

The rules for HTTP caching are set out in RFC 9111, published in June 2022, which defines caches and the header fields that control them. People who search for "clear cache" usually mean something else: emptying their own browser's cache. In Chrome on a computer, you open the More menu, choose "Delete browsing data", pick a time range and the data to remove, and confirm.

How it works

In each response, the server uses the Cache-Control header to say how long it may be stored. max-age sets the number of seconds during which the copy counts as fresh and can be used without asking. With no-cache, the copy is stored but has to be checked with the server before each use. With no-store, it is not stored in any cache. If there is no Cache-Control header, a cache may apply an estimated lifetime, which MDN calls heuristic caching.

When a copy expires, the cache does not have to download it again in full. It can ask the server whether it has changed by sending the ETag value it received in an If-None-Match header. If nothing has changed, the server replies 304 Not Modified with no body, and the cache keeps using its copy.

To store files for a long time without serving old versions, you change their address whenever their content changes, for example by adding a fingerprint to the file name. MDN calls this technique cache busting.

Storing a copy and using it unchecked are two different things, and no-cache only rules out the second.

Why it matters

The cache affects the speed users experience. Google says so in Google Account Help: after clearing the cache, some sites load more slowly at first, because content such as images has to be downloaded again.

It also affects crawling. Google's crawlers support HTTP caching with the header pairs ETag and If-None-Match and Last-Modified and If-Modified-Since, and if a response carries both, they use ETag. Google recommends sending both. It also warns that Googlebot caches resources aggressively and may ignore caching headers when rendering, so it can end up using outdated JavaScript or CSS. The fix it recommends is the same fingerprint in the file name.

We measured this for zds.es on 14 October 2026. The HTML pages send no Cache-Control header, and Cloudflare marks them as DYNAMIC, so every visit is answered by the server. The template's JavaScript file carries a fingerprint in its name, is stored for a year with max-age=31536000 and immutable, and is served from Cloudflare's cache. The font files, which have no fingerprint, are stored for four hours. When we requested one again with its ETag, the server replied 304.

Best practices

  • Give static files with a fingerprint in their name a long max-age.
  • Use short lifetimes or revalidation for content that changes without changing its address.
  • Send ETag and Last-Modified so that browsers and crawlers can revalidate.
  • Reserve no-store for responses that must not be stored, such as personal data.
  • Check the actual headers of a page and its resources, not just the configuration.
  • Purge the CDN cache after changes to files whose address stays the same.

Common mistakes

  • Believing that no-cache prevents storage. What it prevents is use without checking first.
  • Caching files for a year when their name does not change with their content.
  • Testing a change in your own browser without clearing the cache and concluding that it did not work.
  • Assuming that Googlebot follows the same caching headers when rendering.
  • Sending Last-Modified in a date format that does not follow the HTTP standard.
Manuel Riveiro Rodriguez CEO & Digital Strategist

A technical audit covers this and everything else in one pass.

Request an audit

Frequently asked

How do I clear my browser's cache?

In Chrome on a computer, open the More menu, choose "Delete browsing data", select the time range and the data to remove, and confirm. Google notes that some sites may then load more slowly at first, because content such as images has to be downloaded again.

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

With no-cache, the response is stored, but the cache has to check with the server that it is still valid before using it. With no-store, the response is not stored in any cache. For data that must not stay on the device, no-store is the right directive.

Does caching help SEO?

Indirectly. A well-configured cache speeds up repeat visits and reduces what the server has to send. Google's crawlers support revalidation with ETag and Last-Modified, and a 304 response has no body, so it is very small.

Why does Google still see an old version of my CSS?

Google warns that Googlebot caches resources aggressively and may ignore caching headers when rendering. If a file changes without its name changing, Google may keep using the old version. That is why it recommends adding a fingerprint of the content to the file name.

What is a shared cache?

A cache between the user and the server that stores responses for many users at once, such as a CDN's cache. The browser cache, by contrast, is private: only that browser uses it. Pages with personal data should therefore not be stored in a shared cache.

Sources

  1. MDN Web Docs, "HTTP caching", last modified 14 August 2026. Source for the definition of the HTTP cache, private and shared caches, max-age, no-cache and no-store, heuristic caching, revalidation with ETag and 304, and cache busting.
  2. IETF, RFC 9111 "HTTP Caching", June 2022. Source for the standard that defines HTTP caches and their header fields.
  3. Google for Developers, "Google Crawler (User Agent) Overview", last updated 12 June 2026. Source for the caching headers Google's crawlers support and their preference for ETag.
  4. Google Search Central, "Understand JavaScript SEO Basics", last updated 4 March 2026. Source for Googlebot caching aggressively and possibly ignoring caching headers, and for the file name fingerprint recommendation.
  5. Google Account Help, "Clear cache & cookies", computer version, no date on the page. Source for how to clear the cache in Chrome and for some sites loading more slowly at first afterwards.