The intelligent compression feature enables Dynamic Route for CDN (DCDN) to compress static files by using Gzip. Gzip compression reduces the size of the transmitted files and accelerates content delivery. This topic describes how to enable the intelligent compression feature.

Background information

  • Intelligent compression supports the following formats: text/html, text/xml, text/plain, text/css, application/javascript, application/x-javascript, application/rss+xml, text/javascript, image/tiff, image/svg+xml, application/json, and application/xmltext.
  • If a request from a client includes the Accept-Encoding: gzip request header, the client expects the requested content to be Gzip compressed.
  • If a response from DCDN includes the Content-Encoding: gzip response header, the returned content is Gzip compressed.
Notice
  • If files on the origin server have MD5 validation configured, do not enable this feature. After a static file is compressed, the MD5 value of the compressed file is different from that of the file on the origin server. The MD5 validation will fail due to the inconsistency.
  • DCDN compresses files on the origin server only when the file size exceeds 1,024 bytes.
  • Internet Explorer 6 is not fully compatible with Gzip.If your website has access requests from Internet Explorer 6, we recommend that you disable the intelligent compression feature.

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 File Compression section, enable intelligent compression.
    File Compression