Qcache
24 November 2026HTTP & Caching

Cache-Control headers that rarely surprise you

Most caching bugs come from treating HTML documents and fingerprinted static assets with the same header policy.

1. Fingerprinted CSS and JS

When filenames include a content hash, browsers and CDNs can cache them aggressively without hurting deployments:

Cache-Control: public, max-age=31536000, immutable

2. Entry HTML documents

Always allow conditional revalidation on index.html so new deployments propagate on the very next refresh:

Cache-Control: public, max-age=0, must-revalidate

3. Event streams and live endpoints

For Server-Sent Events or chunked responses, disable proxy buffering and intermediary compression so frames flush immediately:

Cache-Control: no-store, no-cache, no-transform
X-Accel-Buffering: no