Adds cache bursting to production mode

Package installer bumps CDF version, we make sure to purge the angular
cache
initial js loader gets a cache burst as well
This commit is contained in:
perploug
2014-02-10 13:02:16 +01:00
parent 2850c3c3de
commit 36a8599e62
8 changed files with 83 additions and 31 deletions

View File

@@ -124,11 +124,15 @@
<data name="JsNoCache" xml:space="preserve">
<value>yepnope.addFilter(function (resourceObj) {
var url = resourceObj.url;
var _op = "?";
if(url.indexOf("lib/") === 0 || url.indexOf("js/umbraco.") === 0){
return resourceObj;
}
if(url.indexOf("?") &gt; 0){
_op = "&amp;";
}
resourceObj.url = resourceObj.url + "?umb__rnd=" + (new Date).getTime();
resourceObj.url = resourceObj.url + _op + "umb__rnd=" + (new Date).getTime();
return resourceObj;
});</value>
</data>