1
votes

I have a problem in my Umbraco backoffice, where alot of the clientside files are cached heavily, which is causing some problems.

All the files loaded, is from /umbraco/Application and contains references like;

"/umbraco/lib/jquery/jquery.min.js?cdv=1",
  "/umbraco/lib/angular/1.1.5/angular.min.js?cdv=1",
  "/umbraco/lib/underscore/underscore-min.js?cdv=1",

But, how can i change the cdv value? I tried to change it under /config/ClientDependency.config, but nothing happend (it is not the same value in the config file and in the output above). So maybe the backoffice is using a different config file for ClientDependency? Or any other ideas?

2
That's a weird problem, in my installation the cdv value matches the version number of the clientdepency node. What version of Umbraco are you using? - Mark
Version 7.2.. ClientDependency.config says '505578704' under version, but 1 is used, as shown above - brother
Is your site in debug mode? E.g. <compilation debug=”true”/> - ProNotion
We know the site is in debug mode because these scripts are being loaded rather than being loaded as one large JS blog. - harvzor
What version of the clientdependency dll is used? - Mark

2 Answers

0
votes

On my Umbraco 7.4.1 installation, changing the version of clientDependency.config worked for me:

From:

<clientDependency version="1" fileDependencyExtensions=".js,.css" loggerType="Umbraco.Web.UI.CdfLogger, umbraco">

To:

<clientDependency version="2" fileDependencyExtensions=".js,.css" loggerType="Umbraco.Web.UI.CdfLogger, umbraco">

After the change, the script files were being called as:

/umbraco/lib/jquery/jquery.min.js?cdv=2
/umbraco/lib/angular/1.1.5/angular.min.js?cdv=2
/umbraco/lib/underscore/underscore-min.js?cdv=2

Etc.

0
votes

If it's only your browser with this issue (rather than a clients whose you don't have access to), then you can just force your browser to load new version of HTML, CSS and JS rather than using the internal HTTP cache.

How to tell if you're loading cached resources

You will know if your browser has cached the resources by looking at the Network tab in your browsers Dev Tools. If resources are being loaded with a 304 rather than a 200, they have been loaded from the internal cache.

Forcing reload on Chrome

There is a SO post here which tells us the difference between each reload option.

General browser shortcuts

There is also a bit of information here about how you can use a keyboard shortcut to force a hard refresh on your browser.

Plugins

Clear Site Cache has worked quite well as a browser plugin for Firefox for me.