Cache Notes
Headers

No-cache and no-store are different

Similar names, different decisions.

No-cache permits storage

A no-cache response may be stored, but it must be validated before reuse. This is useful when you want a resource checked again while retaining the bandwidth benefit of a valid stored response.

No-store prevents storage

No-store asks caches not to store that response. It does not erase every copy that might have been stored under an earlier policy. Sensitive content also needs appropriate application and authentication controls.

Be careful with public

Public explicitly permits shared caching in cases that might otherwise be restricted. Do not use a generic asset policy for a personalised response. Before changing production headers, test the intended response as both an anonymous and an authenticated request.

Open the workbench → · Back to the notes

Keep reading