HTTP caching pattern: Cache bust static files
29 May 2023 (Updated 29 May 2023)
In a nutshell
Most bundlers like Webpack support adding hashes to generated bundles. When you deploy a new JavaScript or CSS file, the generated filename will change so browsers won’t serve old cached files:
Or if you’re serving static files from PHP or some other server-side templating language, you can do something like:
Tagged:
HTTP caching
Thanks for your comment . Once it's approved, it will appear here.
Leave a comment