I'm using the following code these days to include my JS and CSS files within my (Umbraco) websites:
@using ClientDependency.Core.Mvc;
@{
Html.RequiresCss("link-to-file", 1);
Html.RequiresCss("link-to-file", 2);
Html.RequiresJs("link-to-file", 1);
}
I've noticed that the following files is being called when loading the site: https://mysite.nl/DependencyHandler.axd?s=L2xpYi9zY3JpcHRzL21vZGVybml6ci5jdXN0b20uanM7L2xpYi9zY3JpcHRzL2pxdWVyeS5kbG1lbnUuanM7L2xpYi9zY3JpcHRzL3NpdGUuanM7&t=Javascript&cdv=1511701721
After making changes to either the CSS or JS files and uploading them to the server, the DependencyHandler call remains the same. Therefor, the CSS and JS are being cached on the server and I don't see my changes on the live site.
I need to manualy change the ClientDependency version (within ClientDepenedency.config). If I change that, the 'cdv' value at the end of the DependencyHandler call is changed (to the version I changed it in ofcourse), and the new files are being served.
Is there a way to get the DependencyHandler notice changes in the files and automaticly refresh the cache?