RFC 9111 HTTP Caching Cheatsheet
Practical header policies separating immutable hashed bundles from fast-changing HTML entry points.
Recommended Cache-Control Matrix
| Asset Class | Header Value | Why |
|---|---|---|
Hashed JS/CSS (app.8f2c.css) | public, max-age=31536000, immutable | URL changes on edit; browsers skip revalidation |
| HTML documents | no-cache | Browser always revalidates with If-None-Match before display |
| Private user API JSON | no-store | Prevents sensitive payloads from sitting on disk caches |
| Static feeds or SVG icons | public, max-age=86400 | Low churn; quick bandwidth savings |
Conditional Requests & 304 Responses
GET /docs.css HTTP/2
If-None-Match: "673d14a8-19c4"
HTTP/2 304 Not Modified
ETag: "673d14a8-19c4"
Cache-Control: public, max-age=86400
Note that no-cache does not mean "never store" — it permits storing the response locally while requiring an origin conditional check (ETag or Last-Modified) before serving it.