Quickly add a cachebuster to @import statements
This CLI one-liner searches for .css
files with @import
statements and adds a ‘cache busting’ query string to it.
You can use it to make sure the browser picks up the new CSS files when they are included with @import
statements.
Snippet
find . -iname *.css -exec sed -i -e 's/@import "(.*).css"/@import "1.css?cb=12345"/g' {} ;