HTTP caching lets browsers and CDNs reuse a response instead of re-fetching it, controlled by the Cache-Control header. The winning pattern for web apps: hash your asset filenames and cache them forever; keep HTML uncacheable.
The two-tier strategy
http
# Hashed, versioned assets — content never changes for a given URL
Cache-Control: public, max-age=31536000, immutable
# e.g. /static/app.9f2c1a.js (the hash changes when content changes)
# HTML — must always be fresh so it can point at new asset hashes
Cache-Control: no-cache
