Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hey guys/gals me again,
So I've got an odd one, when we make changes to CSS that is loaded using Html.RequiresCss, which ends up being a Dependency Handler statement, the CSS changes aren't displayed on the live site.
How can I force Dependency Handler to pick up these CSS changes and server them?
I've tired republishing the whole site, re-saving the CSS, re-saving the template, clearing my local PC cache.
There was a bug in certain versions of the ClientDependencyHandler nuget package in that it didn't set up the configuration properly in the web.config file.
If you don't see the following line in the web.config:
but instead see something like this:
at the bottom of the config file then you have a problem.
Make sure that the web.config is pointing at the ClientDependency.config file in /config and you'll be able to refresh the cache simply by incrementing the version.
Looks like that could be it, my entry in web config looks as follows:
<!-- Full config documentation is here: https://github.com/Shazwazza/ClientDependency/wiki/Configuration -->
So I'll change it to bring it inline with your advice and see how it goes.
Does that mean if I change my CSS file I need to increment that value every time? It doesn't seem very "editor" friendly.
Editing CSS is not normally considered an Editor's job - do you really want them messing with the layout and style of the site?
You can also install the ConfigTree plugin in the Developers section which will give you access to editing the config files - I use this to do things like update the ClientDependency Version number.
Just had to manually increment the ClientDependency version when I updated a Plugins CSS.
Otherwise, have never had to do this before as a developer or editor. Can't push the .config file itself since locally it's way behind the live site.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted