Jump to content

Disable caching of css files


Design1online

Recommended Posts

4 hours ago, Dinocanid said:

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

Edited by Design1online
Link to comment
Share on other sites

2 minutes ago, Design1online said:

@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 case changes. For instance http://yourdomain.com/css/theme.css?v=1

Uh...can you give more steps?

Link to comment
Share on other sites

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

Edited by Design1online
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...