i have problem, i always getting old cached js files.
as soon as i increase the number and remove the extensions .js,.css and restart the application, i'm being served the current js files. Any small change is instantly updated as no cache system seems to interfere with the serving of files.
To manage this problem, I've added a prebuild event that change the version number every time I build. And the same action is done with a ++ in my CI. This should get done directly in umbraco. When I deploy or rebuild, necessarely, the cache need to be refreshed, (I think).
Changes in Plugins' js file not applied due to cache
I have a custom plugin, it is in the App_Plugins folder. It is working.
I am changing a couple of lines in the plugins controller.js file.
I am reloading the page.
Changes are not applied because i'm getting served an old, cached version of that controller.js file.
This is so simple, yet so frustrating.
Answering my own question after a bit of searching:
I managed to disable the cache caused by the client dependency by going to the /Config/ClientDependency.config and changing the line that said
to
as you can see i changed the version number so cache will expire, and i removed the .js and .css extensions.
That of course means js and css files wont get cached anymore.
As a side note, you guys really need to make a much simpler solution than this hacky way i did.
How about a simple, plain
or something like that?
Not trying to offend anyone btw, but this did ruin my day at work. link.
If you have debug set to true on your compilation tag in the web.config the js and css files are not bundled and minified.
That way you don't need to change the client dependency config all the time when you make a change.
Just a hard refresh of your browser (which will clear the browser cache) is enough.
Be sure to set it back to false when moving to production.
Dave
That is not correct. I tried
also in my web.config
Recycled pool, did "Emtpy cache and Hard reload" on chrome with the parameter ?umbDebug=true, and i was still being served the cached files.
Strange,
That works fine for me. Did you undo your changes to the clientdepedency config ?
Dave
Excuse me but i can't understand your question; You asking if i undid the changes when?
with
i have problem, i always getting old cached js files.
as soon as i increase the number and remove the extensions .js,.css and restart the application, i'm being served the current js files. Any small change is instantly updated as no cache system seems to interfere with the serving of files.
That is because you are disabling the cache of client side assets entirely. That is not recommended.
I'm responding to confirm that this is an issue for me as well. In multiple Umbraco applications that I manage.
To manage this problem, I've added a prebuild event that change the version number every time I build. And the same action is done with a ++ in my CI. This should get done directly in umbraco. When I deploy or rebuild, necessarely, the cache need to be refreshed, (I think).
Deleting the
\App_Data\TEMP\ClientDependency
folder also does the trickFor me, setting debug="true" for compilation did not work on v8.11.1 but works now I have upgraded to v8.13.0.
is working on a reply...