The HTML optimization feature enables Dynamic Route for CDN (DCDN) to automatically remove redundant comments and duplicate spaces from HTML pages. This reduces the file size and improves the page readability. This topic describes how to enable the HTML optimization feature.

Background information

After HTML optimization is enabled, DCDN automatically removes redundant comments and duplicate spaces from HTML pages. This reduces the file size and improves the delivery efficiency.

If MD5 verification is configured for the files on the origin server, do not enable the HTML optimization feature. After pages are optimized, the MD5 hash values of the optimized files are different from those of the files on the origin servers. As a result, the MD5 validation fails due to the inconsistency.

Procedure

  1. Log on to the DCDN console.
  2. In the left-side navigation pane, click Domain Names.
  3. In the left-side navigation pane on the details page of the specified domain, click Optimization.
  4. In the HTML Beautifier section, turn on HTML Beautifier.