# Use Long Browser Caching for Fingerprinted Assets

https://ferkesh.net/zh/knowledgebase/article/browser-cache-immutable-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.

![Old bytes: Known hashed URL; New bytes: New URL in HTML; Rollback: Prior assets still available.](https://ferkesh.net/kb-media/ferkesh-guide-diagrams-batch-16.svg#browser-cache-immutable-fingerprinted-assets)

## 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](https://ferkesh.net/knowledgebase/article/browser-caching-for-web-performance)
- [How to Diagnose Stale Content and HTTP 304 Responses](https://ferkesh.net/knowledgebase/article/diagnose-conditional-http-304)

## Official references

- [Cache-Control – MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Cache-Control)

Last reviewed November 27, 2026.
