To compress static text files, you can enable the Brotli compression feature to reduce the size of the transmitted content and accelerate delivery. This topic describes how to enable the Brotli compression feature.

Background information

Brotli is a new open source compression algorithm. After you enable Brotli compression, Dynamic Content for CDN (DCDN) nodes compress text files such as HTML, JS, and CSS files when DCDN returns the requested resources. Brotli compression is 15% to 25% more efficient than gzip compression.

  • If a request contains the Accept-Encoding: br header, this indicates that the requested resources are required to be compressed by using Brotli.
  • If a response from DCDN includes the Content-Encoding: br header, this indicates that Brotli is used to compress the requested resources.
  • If both Brotli compression and gzip compression are enabled, and the Accept-Encoding request header contains br and gzip, Brotli compression prevails over gzip compression.
  • If compression is enabled on an origin server and the response contains the Content-Encoding header, Brotli compression is not supported.


  1. Log on to the DCDN console.
  2. In the left-side navigation pane, click Domain Names.
  3. On the Domain Names page, find the domain name that you want to manage, and click Configure in the Actions column.
  4. On the details page of the specified domain name, click Optimization in the left-side navigation pane.
  5. In the Brotli Compression section, turn on Brotli Compression.