Currently, I'm working on a Umbraco 10 project and hosting it on Azure app service.
Every time when I deployed css file to webroot folder (overwrite the existing one). The website is not affected by the new css file (it still refers to the old one).
I tried either restarting the website or adding "?version=xxx" to css url. But none of them work.
This is client-side cache. You don't really have control over it in the back-end unless you change the file path. Adding a query parameter technically changes this.
What should work is appending anything to the URL like ?version. Are you sure the version is different after deploy?
If not, check the response headers when getting the resource.
Can Not Clear CSS Cache
Hi everyone,
Currently, I'm working on a Umbraco 10 project and hosting it on Azure app service.
Every time when I deployed css file to webroot folder (overwrite the existing one). The website is not affected by the new css file (it still refers to the old one).
I tried either restarting the website or adding "?version=xxx" to css url. But none of them work.
Does anyone here know how to clear the css cache?
Thanks!
Hi,
This is client-side cache. You don't really have control over it in the back-end unless you change the file path. Adding a query parameter technically changes this.
What should work is appending anything to the URL like
?version
. Are you sure the version is different after deploy?If not, check the response headers when getting the resource.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control
Hi Roy,
It's not client-side here. Because after deploying, even when I use Ctrl+F5, the website still refer to old version of css file.
I tried to add ?v=1.0.0 to css path, but got the same issue.
The website only get new css rules if i change css file name and refer to this file.
So i believe that the old version of css file was cached somewhere but so far i don't know how to clear the cache :(
is working on a reply...