Courses / Frontend Security & Observability
18. Static asset versioning and cache invalidation
Fingerprinting, content hashing, and cache-control strategies for serving frontend assets correctly.
JavaScript
Static asset versioning and cache invalidation
A method to ensure browsers use the newest frontend files by giving each file a unique, content-based name and cache rules.
"I deploy a bugfix but users still see the old JavaScript — how do I force browsers to fetch the new file?"
Fingerprinting adds a short hash to filenames based on file contents so when contents change the filename changes; cache-control headers tell browsers how long to keep files locally.
"I deploy a bugfix but users still see the old JavaScript — how do I force browsers to fetch the new file?"
Fingerprinting adds a short hash to filenames based on file contents so when contents change the filename changes; cache-control headers tell browsers how long to keep files locally.