Cache Notes
Concepts

Fresh does not always mean current

A cache can be doing exactly what you asked.

Start with the response

A successful deployment does not automatically invalidate a browser cache. A stored response can remain fresh for its declared lifetime. Inspect the URL and response headers before assuming the new file was never delivered.

Separate reuse and validation

A fresh response may be reused without a new request. A stale response can be validated with a conditional request if a validator is available. A 304 response confirms reuse of the stored representation; it is not a replacement body.

Make the policy explicit

Use a deliberate policy for HTML and a different one for versioned assets. Record the intended behaviour next to the deployment procedure. When investigating a report, compare a normal reload with the same URL in a clean browsing context; do not change every header at once.

Open the workbench → · Back to the notes

Keep reading