The smart compression feature enables Dynamic Route for CDN (DCDN) to implement gzip compression on static files. The gzip compression feature helps you reduce the size of the transferred files and accelerate content delivery. This topic describes how to enable the smart compression feature.
- Intelligent compression supports the following formats:
- If a request from a client includes the
Accept-Encoding: gziprequest header, the client expects the requested content to be gzip compressed.
- If a response from DCDN includes the
Content-Encoding: gzipresponse header, the returned content is gzip compressed.
- If MD5 verification is configured for files on origin servers, do not enable the smart compression feature. After static files are compressed, the MD5 hash values of the compressed files are different from those of the files on the origin servers. As a result, the MD5 validation fails due to the inconsistency.
- DCDN compresses files on origin servers 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 smart compression feature.
- Log on to the DCDN 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 Configure in the Actions column.
- In the left-side navigation pane on the details page of the specified domain, click Optimization.
- In the File Compression section, turn on File Compression.