The post describes different configuration options of SXA Asset Optimizer and their influence on each other.
Asset Optimizer configuration
Each row represents example configuration set and the end result. Some options have priority over the other.
- Asset - contains cases that I wanted to highlight.
- Global - global settings set on
/sitecore/system/Settings/Foundation/Experience Accelerator/Theming/Optimiser/Styles
or/sitecore/system/Settings/Foundation/Experience Accelerator/Theming/Optimiser/Scripts
- available options:
Concatenate
,Concatenate And Minify
,Disabled
- available options:
- Site - site specific settings set on Page Designs item, field Styles/Scripts optimizing enabled (section: Assets Optimization)
- available options:
Default
,No
,Yes
- available options:
- Theme - theme specific settings set on a theme item, field Mode (section: Theme)
- available options:
On
,Off
,Inherit from System
,Inherit from Site
- available options:
- Result - outcome of configuration set. YES indicates assets will be processed.
Asset | Global | Site | Theme | Result |
---|---|---|---|---|
Site - explicitly disabled | ||||
script/style | [ANY] |
No | Inherit from site | NO |
Site - explicitly enabled | ||||
script/style | [ANY] |
Yes | Inherit from site | YES |
Site - use default settings (global) | ||||
script/style | Concatenate And Minify | Default | Inherit from site | YES |
script/style | Disabled | Default | Inherit from site | NO |
Theme - respects only global | ||||
script/style | Disabled | Default | Inherit from system | NO |
script/style | Concatenate And Minify | Default | Inherit from system | YES |
Theme - explicitly disabled | ||||
script/style | [ANY] |
Default | Off | NO |
Theme - explicitly enabled | ||||
script/style | [ANY] |
Default | On | YES |
Summary
Hopefully this table made it easier to understand how to configure Asset Optimizer. If you have any questions, just ask.