0

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.

David
  • 239
  • 3
  • 10

2 Answers2

1

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

Mehdi Dehghani
  • 10,970
  • 6
  • 59
  • 64
  • Yes, it's easy, open up any page of your site and hit `Ctrl+U` (or right click and select View page source from the menu), look for `jQuery`, you should see the `script` tag and value of `src` attribute is the location you are looking for. (e.g: `/Resources/libraries/jQuery/03_04_01/jquery.js`) – Mehdi Dehghani Mar 04 '20 at 05:24
  • Great instructions. Is there a way to find out where in DNN are physical JS files (e.g. JQUERY) actually referenced? Within the solution, the only place I can see these files is *map.XML - which is said to be re-generated by DNN.. I need to know this so I can point it to a different file and change references. – David Mar 04 '20 at 18:31
  • @David I answered this question in my prev comment. do you want to change jquery version in your site? – Mehdi Dehghani Mar 05 '20 at 05:07
  • Sure, if you can instruct how to change JavaScript library version in DNN, I will add it to my post below for future readers. – David Mar 05 '20 at 18:35
  • Making another folder inside `/Resources/libraries/jQuery`, e.g: `03_04_02` and change the version of jQuery via `JavaScript libraries` doesn't work? I didn't test this solution – Mehdi Dehghani Mar 07 '20 at 09:56
0

enter image description here

The following setting allows CDN references for JavaScript libraries. Thanks to Michael Tobisch

Settings >> Extensions, select JavaScript Libraries from the dropdown list, click the pencil next to the JavaScript jQuery library, select the Extension Settings tab and enter the Url in the Custom CDN setting.

enter image description here

David
  • 239
  • 3
  • 10