Overview
Minification is an optimization method that reduces load times and bandwidth usage on websites by removing unnecessary codes without losing functionality.
You can speed up page downloads in two steps:
- Minify the resources (CSS and JavaScript files) to reduce their sizes.
- Combine the resources into composite files to reduce the number of file requests that the browser makes.
This article provides the steps to minify resource files in your system.
Prerequisites
- You need a host/superuser account to be able to perform the steps outlined in this article. Hosts have full permissions to all sites in the DNN instance.
- Environments: Evoq Content and Evoq Engage
Solution
-
Go to Persona Bar > Settings > Servers.
-
Go to Server Settings > Performance.
-
Configure Client Resource Management.
- Choose the scope of the settings.
-
Global: Applies the Client Resource Management settings to all sites in the installation.
-
<The name of the current site>: Applies the Client Resource Management settings only to the current site.
-
-
Set Enable Composite Files to On.
-
Set Minify CSS and Minify JS to On.
-
Click Save.
Note: You must save the settings to force the creation of a new composite file before incrementing the version number.
-
Click Increment Version.
- Choose the scope of the settings.
-
Click Confirm.
If you are seeing that some files are not being minified, you will need to check that debugging mode is not enabled.
- Go to web.config file in the root folder.
- Search for
<compilation debug=
. - Check if it is enabled (then it will be set to "true"). If not disable it by setting it to "false".
- Clear the cache and restart the application.
- Clear the cache of the browser used to identify the minification is working properly.
Testing
You can test that composite files have been enabled by:
- Pressing F12 to open Developer Tools in Chrome
- Click Application
- Expand Frames and the Scripts dropdown
- You can see that the scripts have been minified into separate files.
Comments
0 comments
Please sign in to leave a comment.