Skip to content
ferkesh.HOSTING

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.

Old bytes: Known hashed URL; New bytes: New URL in HTML; Rollback: Prior assets still available.

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.

Official references

Last reviewed .

Was this helpful?

Thanks for your feedback!

Still Need Help?

The support team is here around the clock for anything you can't find in the knowledge base.