Search code examples
dotnetnukednn9

DNN - How can I edit Client Dependency files to change mappings for a specific JQuery resource file?


I have a Dot Net Nuke (DNN 9.1) site which is hosted on IIS. I have located some resources that have made the website very slow, mostly JS / CSS files. I traced these files are referenced in resource files like below:

Website\App_Data\ClientDependency\DNNWeb-someGUIDaaarfgxetrrcxxdrwdc-map.xml

which has entriees like below:

  <item key="678f2dbfsdg- some key -dtgsdt54fdfgy7" file="" compression="" version="180">
        <files>
          <file name="/Resources/libraries/jQuery/01_09_01/jquery.js" />
          <file name="/Resources/libraries/jQuery-UI/01_11_03/jquery-ui.js" />
        </files>
  </item>

I need to modify mapings so the minimized version of JS files may be used, to enhance performance (e.g. jquery.min.js), however, its being said that this XML file gets regenerated if modified manually, and my changes will be lost.

Any thoughts or help will be appreciated. Thank you.


Solution

  • DNN loads minified CSS and JS files based on user config. you need to enable this options, the options are

    • Enable Composite Files
    • Minify CSS
    • Minify JS

    In order to change above settings go to Settings (gear icon) -> Servers -> Server Settings Tab -> Performance tab, then find Client Resources Management Mode section (at the bottom of this tab (as of v9.5)) and change the options as you prefer.

    enter image description here