I am about to do upgrades to webpages and css-files in our production environment. I would like to prevent css caching in the web browser, since this would otherwise disrupt the design if the new html is used together with the old css. I have made changes to three css-files in total:
To prevent browser caching I have added a querystring to my main css-file like: ...link href="main.css?rev=20121024"...
I now wonder if the use of a querystring on main.css helps prevent caching of the css-files A and B that are referenced inside main.css with @import statements? Or do I need to also apply querystrings for them like @import "css-fileA.css?rev=20121024" ?
Any help is greatly appreciated.
I expect each file to be treated independently. Why would it make a difference whether css-fileA.css
was loaded directly or via @import
? It's still the same URL and the cache should be used the same way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With