Administrators may report that it takes a significant amount of time to load the persona bar for users, this is mainly due to the export-bundle.js file. By enabling Dynamic and Static Content Compression, it can speed up the loading time of the Persona Bar.
- Access to the web.config file in the DNN root directory.
When the Persona Bar loads in the browser, it first gets the export-bundle.js file and needs to parse the JSON before loading the icons based on the user permissions.
There are two types of compression offered by IIS:
- Static content compression
- Dynamic content compression.
If the static compression is enabled, then IIS will compress static content and save it to the cache folder.
If the dynamic compression is enabled, IIS will compress content each time a client requests it, since the dynamic content is created depending on a client request and because of it changes often.
In most cases, there is no need to perform this process unless a JSON payload request is taking too long to complete, this can be verified by pressing F12 and using the developer tools in the browser to look at the timing of the request.
- To enable compression for JSON, make sure that Dynamic Content Compression and Static Content Compression are enabled on the webserver. This can be verified from the Windows Features section. For further insight on how to enable both content compression kindly go through this article on HTTP Compression <httpCompression>.
- Then proceed to enable both the Dynamic and Static Content Compression for your Site on IIS using the below steps:
- Open Internet Information Services (IIS) Manager.
- In the Connections pane, go to the connection, site, application, or directory for which you want to enable compression.
- In the Home pane, double-click Compression.
- In the Compression pane, check the boxes to enable static and dynamic compression.
- Once you have completed the above steps, click Apply in the Actions pane.
3. After the confirmation, add the below script to the
applicationHost.configfile: (The applicationHost.Config File can be located at "C:\Windows\System32\inetsrv\config"
<httpCompression>4. In case the node already exists in the
<add mimeType="application/json" enabled="true" />
applicationHost.configfile, only add the JSON mimeType entry.
5. Proceed to access your DNN Site.
The JSON payload request is completed (this can be verified by looking at the network tab in the browser developer tools by pressing F12) and the persona bar loads normally with no delays.