Enable and configure the Asset Optimizer

Abstract

Enable the Optimizer globally for entire Sitecore instance or locally for selected tenants.

The Asset Optimizer is a module that optimizes CSS styles and JS scripts. When it is enabled in a production environment, the Asset Optimizer improves overall site performance by reducing the amount of data that needs to be transferred. Sitecore administrators can enable this module either globally for the entire Sitecore instance or locally for selected tenants.

Note

It is best practice to disable the Asset Optimizer in development environments and to enable it in production environments.

To enable the optimizer globally:

  • In the Content Editor, navigate to /sitecore/system/Settings/Foundation/Experience Accelerator/Theming/Optimiser and for both Scripts and Styles select Concatenate and Minify to minify all files and concatenate them into one file.

FEB2CF1FD185475686E2943AA825EF19.png

Note

Changes take effect immediately after the item is saved. Anonymous users might not see the changes until you publish.

To change the optimization settings for a specific site:

  1. In the Content Editor, navigate to sitecore/content/<Tenant>/<Site>/Presentation/Page Designs.

  2. In the Asset Optimization section, in the Styles Optimizing Enabled and Scripts Optimizing Enabled fields, to override styles and scripts optimization settings, select:

    • Default – to inherit global settings

    • Yes – to always enable optimization for this site.

    • No – to always disable optimization for this site.

    380FE4A4684F4DFAAE5352A3189B0234.png