CSS Cache Busting and Git Renaming
June 5, 2024
Cloudflare Caching and Git File Rename Issues
Cloudflare cache busting:
- Cloudflare caches CSS files, causing outdated styles to persist
- To bust the cache, Leal appended a version query param to the CSS file URL
- e.g.,
href="css/talent-protocol-v2.webflow.css?v=1" - The value after the URL can be any string, it acts as a cache buster
Git file renaming:
- Wanted to rename
Coinbase_logo.svgtocoinbase_logo.svgfor consistency - Git doesn't automatically track renames with different casing
- Leal used
git mvto force the rename: git mv images/Coinbase_logo.svg images/coinbase_logo.svg
Thanks to:
- Learned these techniques from Leal. Dr. Peter Venkman would be proud