Brotli is an open source compression algorithm. You can enable the Brotli compression feature to compress text files before they are returned to users. This reduces file sizes, accelerates content delivery, and reduces bandwidth usage.

Background information

  • Brotli compression supports the following formats:
  • If a request includes the Accept-Encoding: br request header, the client expects the requested resources to be Brotli compressed.
  • If a response from the origin server includes the Content-Encoding: br response header, the resources returned to the client are Brotli compressed.

Procedure

  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. The details page of the specified domain name is displayed. In the left-side navigation pane, click Optimization.
  5. In the Brotli Compression section, turn on Brotli Compression.
    After you enable Brotli compression, you can compare the sizes of a file before and after compression is performed. If the file size is reduced, the file has been compressed.

API operations

BatchSetDcdnDomainConfigs