im following the http://umbraco.github.io/Belle/#/tutorials/CreatingAPropertyEditor tutorial, just to get a hang of how umbraco 7 is doing things. Though, i can make it to take the new version of my js file with it, no matter what i do. Ive re-build, restarted the application deleted app_data/TEMP, but it still give me the alert from the first version instead of taking the new version of the js file. Anyone els have a problem with this ? and how to avoid it ?
What should i do to umbraco to know about the new version of the javascript file ? can't figure out what does it, but sometimes the new version get loaded, though it is a combination of clearing browser cache, clearing app pool, reseting the site, deleting temp folder.. Should it really be that hard?!
I had the same problem. I don't have a good solution, but the workaround I found was to increment a number at the end of the controller's filename (e.g. "myPropEditor005.controller.js"), and update the link in the manifest accordingly ( "~/App_Plugins/MyPropEditor/MyPropEditor005.controller.js"), each time I want to test it. It's a pain, but it did at least work reliably as long as the filename was unique each time. When doing this, I usually didn't even have to clear the cache or touch web.config, refreshing the page was usually enough.
Hopefully there is, or will soon be, a better way to do this.
There are currently 2 caching mechanisms in umbraco 7 - on the client-side the browser caches files quite heavily, and the angularjs framework we use, also does quite a bit - normally clearing the browser cache will work there.
Additionally, there's the client dependency framework on the serverside, which combines and minifies js+css files, this is turned off when the site is in debug mode, which it should be during development.
We've logged acouple of issues on file caching and will work on imroving this in 7.0.2
Other option without changing debug=true (in my opinion you should not change this on a deployed site) is handling the client dependency api.
Edit the ClientDependency.config file under Config folder.
Increase the version value and save the file (on this case will be 1816063018 ). All your .js files and .css files with be refreshed with your changes.
Hope this helps, I spend some time to figured out this cache system.
There are other answers, but I'm not a fan of debug=true solution which is the only one here that worked for me. Besides, if you remove it back the debug attribute it goes back to previous js version.
What worked for me was to remove folders:
App_Data\cache
App_Data\TEMP
This forced Umbraco to recompile the js files.
Note: It pops an error that some indexing files are not able to be removed, just skip those.
umbraco dosn't load new version of js file.
im following the http://umbraco.github.io/Belle/#/tutorials/CreatingAPropertyEditor tutorial, just to get a hang of how umbraco 7 is doing things.
Though, i can make it to take the new version of my js file with it, no matter what i do. Ive re-build, restarted the application deleted app_data/TEMP, but it still give me the alert from the first version instead of taking the new version of the js file.
Anyone els have a problem with this ? and how to avoid it ?
What should i do to umbraco to know about the new version of the javascript file ? can't figure out what does it, but sometimes the new version get loaded, though it is a combination of clearing browser cache, clearing app pool, reseting the site, deleting temp folder.. Should it really be that hard?!
I had the same problem. I don't have a good solution, but the workaround I found was to increment a number at the end of the controller's filename (e.g. "myPropEditor005.controller.js"), and update the link in the manifest accordingly ( "~/App_Plugins/MyPropEditor/MyPropEditor005.controller.js"), each time I want to test it. It's a pain, but it did at least work reliably as long as the filename was unique each time. When doing this, I usually didn't even have to clear the cache or touch web.config, refreshing the page was usually enough.
Hopefully there is, or will soon be, a better way to do this.
There are currently 2 caching mechanisms in umbraco 7 - on the client-side the browser caches files quite heavily, and the angularjs framework we use, also does quite a bit - normally clearing the browser cache will work there.
Additionally, there's the client dependency framework on the serverside, which combines and minifies js+css files, this is turned off when the site is in debug mode, which it should be during development.
We've logged acouple of issues on file caching and will work on imroving this in 7.0.2
/Per
Comment author was deleted
To be a bit more specific, go to your web.config and change the debug attribute to true.
<compilationdefaultLanguage="c#"debug="true"batch="false"targetFramework="4.5">
This disables the minification/cache for js files as Per described.
This got me at first too.
Other option without changing debug=true (in my opinion you should not change this on a deployed site) is handling the client dependency api. Edit the ClientDependency.config file under Config folder.
Increase the version value and save the file (on this case will be 1816063018 ). All your .js files and .css files with be refreshed with your changes.
Hope this helps, I spend some time to figured out this cache system.
Updating the version number actually didn't seem to work for us. I think that's because debug is enabled on our test site.
A bit late but I solved it by adding a query parameter to the script tag src attribute and change it every time I update the js file.
<script src=yourjsfile.js?v=2></script>
There are other answers, but I'm not a fan of debug=true solution which is the only one here that worked for me. Besides, if you remove it back the debug attribute it goes back to previous js version.
What worked for me was to remove folders:
This forced Umbraco to recompile the js files.
Note: It pops an error that some indexing files are not able to be removed, just skip those.
is working on a reply...