Baidu AI Cloud
中国站

百度智能云

CDN

Page Compression

Overview

After enabling the page compression feature, you can compress most static files, effectively reducing the size of transmitted content by users and enhancing the delivery effect.

Currently, page compression supports Brotli Compression and Gzip Compression two ways.

Brotli is an open-sourced new compression algorithm. After the Brotli compression feature is enabled, when the CDN node returns the requested resource, it performs Brotli compression on text files such as html, js and css.

File types that support compression include: text/plain、application/x-javascript、text/css、application/xml、application/rss+xml、application/xmltext、image/tiff、text/javascript、text/html、text/xml、application/javascript、image/svg+xml、application/json、text/json.

Notes

Support compression simultaneous selections of Gzip and Brotli and their independent compressions; once the Brotli compression is selected to start, the Brotli is in priority; If the origin server has already compressed the content, CDN service will not compress it again.

Page Compression Configuration

1.Log in CDN Management Console, select Domain Name Management from the Navbar on the left of the console.

2.On the Domain Name Management page, select the domain name that needs to set HTTP header, and click Management in the action bar to the far right, as shown in the figure below.

image.png

3.On the Domain Name Details page, click Advanced Configuration, as shown in the figure below.

image.png

4.Select Page Compression Configuration on Advanced Configuration tab, and click Edit.

image.png

5.In the page compression area, click Enable, and select the corresponding compression method.

image.png

6.Click Save to complete the page compression configuration.

7.If you want to disable the page compression configuration, switch Enabled to Disabled.

Previous
Page Optimization
Next
WAF Configuration