CSS file not updating to Azure Deploy / Publish

RELEASED Unbeknownst for me, Cloudflare by default caches all css / js files for 4 hours.

Scenario:

I add this to our first page:

<span class="test">hullo!</span>

      

and this is our css file:

.test { font-size:2.0em; }

      

I am using Web Deploy, or will fully publish to Azure, and the range appears on the first page, but not the style. The css file is not updating for some reason. FF, IE, Chrome and Safari all confirm this. However, after a seemingly arbitrary time, the css file is updated.

Even when I delete in the Azure VM and restart the app, the style doesn't change. The application runs on one instance, one role. No Azure Caching. Adding querystring parameter to css file link doesn't help. Looks like a caching problem, but not sure how to solve it.

Any ideas?

+3


source to share


4 answers


"We are using Cloudflare, which is configured by default to cache all CSS and JS files. It clears the cache every 4 hours, resulting in random updates. So even though I was adding a new query string to the end of the css file, Cloudflare was still caching the old one."



Just remember that you must switch to CloudFlare Development Mode when making changes to static content files on your site. You can go into development mode to bypass the cache by going to: settings-> Development Mode. You also have the option to clear the cache as an optional parameter, which we only recommend if you really want to clear everything.

+3


source


It looks like it is being cached by your browser. You can try going to your site and pressing Ctrl + F5.



Perhaps you can use Fiddler to see if the CSS has been cached or not updated, or some error while loading.

+2


source


This issue has been resolved.

We are using Cloudflare which is configured by default to cache all CSS and JS files. It clears the cache every 4 hours, resulting in random updates. So, even though I was adding a new query string to the end of the css file, Cloudflare was still caching the old one.

+1


source


I have looked into this and I will tell you that in my experience in Chrome you can set an option that disables the cache in developer tools, however I noticed that if you do not have the developer tools window press Ctrl + F5 it will not reload the cache ... IE has a global setting in dev tools that will force it to reload everything every time. Firefox also has a parameter in the dev tools that will require it to load and use the cache.

One way you can test this, and how I am testing it, is to run Fiddler and see if it actually does a full download of all your files or caching.

From what I have experienced is that this is indeed a browser caching issue and has nothing to do with Azure.

0


source







All Articles