Glossary · Performance

HTTP Caching

HTTP caching lets browsers and CDNs reuse stored responses, controlled by headers like Cache-Control, ETag and Last-Modified, to avoid repeat downloads.

Updated October 6, 2026

HTTP caching is the set of rules by which a browser, proxy or CDN stores a response and reuses it for later requests. The server controls the behavior through response headers, mainly Cache-Control, ETag and Last-Modified.

Why it matters

The fastest request is the one never sent. A fresh cached file loads in milliseconds with no network use, and a revalidated one costs a tiny round trip instead of a full download. Good caching reduces server load, bandwidth and page load time for returning visitors.

There are two stages. Freshness decides whether the stored copy can be used without asking (max-age). Validation asks the server whether the copy is still current and gets a 304 Not Modified if so.

Example

# Fingerprinted asset, safe to cache for a year
Cache-Control: public, max-age=31536000, immutable

# HTML, always revalidate
Cache-Control: no-cache
ETag: "a1b2c3"

Despite its name, no-cache means "store it, but revalidate before use". no-store forbids storing.

Common mistakes

  • Long max-age on files with stable names; users keep stale code.
  • Sending no caching headers and leaving heuristic freshness to the browser.
  • Using no-cache and no-store as synonyms.

Get notified when this term updates

Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.

This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.