Use Long Browser Caching for Fingerprinted Assets
Long cache lifetimes fit resources whose URL changes when the bytes change. Hashed filenames are a common approach. A reused immutable URL can leave visitors running old assets after a correction.
Separate HTML from assets
On staging record the HTML entry route, versioned script and versioned stylesheet. Check their Cache-Control headers individually. Public HTML may need quicker revalidation so it picks up new resource references. Keep private routes' existing approved cache behavior.
Test two releases
Change an asset in a controlled staging release. Verify the new file receives a different URL and that HTML points there. Open in an ordinary browser and compare the repeat visit with a clean session. Leave old assets available for users with matching cached HTML.
Verify rollback
Restore the prior HTML references and confirm the original files still resolve. Check the CDN and browser independently. If a deployment serves different content at an immutable URL, publish it at a new versioned path before release.
Related Ferkesh Knowledge Base guides
- How Browser Caching Improves Website Performance
- How to Diagnose Stale Content and HTTP 304 Responses
Official references
Last reviewed .
Спасибі за відгук!