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.

Background information

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.

Procedure

  1. Log on to the Dynamic Route for CDN console.
  2. In the left-side navigation pane, click Domain Names.
  3. On the Domain Names page, find the target domain name and click Configure.
  4. In the left-side navigation pane of the specified domain, click Optimization.
  5. In the HTML Beautifier section, enable the HTML optimization feature.
    HTML Beautifier