The HTML optimization feature enables Dynamic Route for CDN (DCDN) to automatically remove redundant comments and duplicate spaces from all HTML pages. This helps to reduce file size and improve page readability. This topic describes how to enable the HTML optimization feature.
With the HTML optimization feature, DCDN automatically removes redundant comments and duplicate spaces from all HTML pages. This helps to reduce file size and improve the efficiency of content delivery.
If files on the origin server have MD5 validation configured, do not enable this feature. After pages are optimized, the MD5 value of the optimized file is different from that of the file on the origin server. The MD5 validation will fail due to the inconsistency.
- Log on to the Dynamic Route for CDN console.
- In the left-side navigation pane, click Domain Names.
- On the Domain Names page, find the target domain name and click Configure.
- In the left-side navigation pane of the specified domain, click Optimization.
- In the HTML Beautifier section, enable the HTML optimization feature.