Disable caching of css files

Design1online

Senior Member
One of my fears is never getting to the final stage, but another one would be css themes. I like to try them out, but at the same time, converting them is an absolute nightmare. The newest css theme on Foodbabs I don't even touch anymore because, whatever the reason may be, that theme in particular can take up to 30 mins to show a change, even if I hard refresh. I could accidentally break something and not know it until waaay later, then fixing it takes just as long.
@Dinocanid do you not know how to disable caching with css files? All you do is add a version number to the file query string. Then as soon as you change the CSS file you update the version number and it will invalidate the browsers cache so it pulls in the new css changes. For instance http://yourdomain.com/css/theme.css?v=1

 
Last edited by a moderator:
When you load your case file just add a query string with a version number on the end. When you update the CSS file you change the version number. You don't have to do anything special with the CSS or the contents of the CSS file, it's just the url to the file that changes.

?v=2 then ?v=3

 
Last edited by a moderator:
Back
Top