If MD5 verification is configured for files on the origin server, do not enable HTML optimization.
The HTML optimization feature changes the MD5 value of a file. After the file is optimized, the MD5 value of the file is no longer the same as that of the original file that is stored on the origin server.
If the origin server has Gzip or Brotli compression enabled, HTML optimization does not take effect. Alibaba Cloud CDN directly returns compressed files to clients.
If you want to use the HTML optimization feature in Alibaba Cloud CDN without disabling Gzip or Brotli compression on the origin server, you can delete the Accept-Encoding header from the origin HTTP headers. After you delete the Accept-Encoding header, the HTML optimization feature takes effect. For more information about how to delete the Accept-Encoding header, see Configure HTTP request headers.
If both HTML optimization and Intelligent or Brotli compression are enabled, HTML optimization does not take effect. Alibaba Cloud CDN only compresses files.
Hydration completed but contains mismatches.To fix the error, disable HTML optimization.
- Log on to the Alibaba Cloud CDN console.
- In the left-side navigation pane, click Domain Names.
- On the Domain Names page, find the domain name that you want to manage and click Manage in the Actions column.
- In the left-side navigation pane of the domain name, click Optimization.
Turn on HTML Optimization: Alibaba Cloud CDN optimizes HTML pages.
Turn on CSS Optimization: Alibaba Cloud CDN optimizes CSS styling.