tencent cloud

Content Delivery Network

Updates and Announcements
Release Notes
Announcements
User Tutorial
Product Introduction
Product Overview
Strengths
Use Cases
Term
Use Limits
CDN Performance Descriptions (Spot-check)
Purchase Guide
CDN Purchase Guide
ECDN Purchase Guide
Getting Started
Configuring CDN from Scratch
Adding Domain Names
CNAME Configuration
Domain Name Ownership Verification
FAQs about Domain Name Connection
Configuration Guide
Domain Management
Domain Name Configurations
Statistical Analysis
Purge and Prefetch
Log Management
EdgeOne
Service Query
Offline Cache
Permission Management
Permission Configuration
Console Permissions
Activate Real-time Logging as Sub-account/Collaborator
Use Cases
Accelerating Resources on COS with CDN
Practical Tutorial
Guide to Using the EdgeOne Tool for Migrating Content Delivery Network (CDN) Related Services
CDN - CVM
CDN - COS
Configuring CNAME via DNSPod
Regularly Storing CDN Logs
API Documentation
History
Introduction
API Category
Content Management APIs
Real-time Log APIs
Service Query APIs
Data Query APIs
Making API Requests
Log Query APIs
StopCdnDomain
Configuration Management APIs
Obsoleted APIs
Other APIs
Data Types
Error Codes
FAQ
Features
Billing
FAQs about Domain Name Connection
Cache Configuration FAQs
Purge and Prefetch
Statistical Analysis
FAQs about HTTPS
Connection
Errors
Troubleshooting Methods
Status Codes and Solutions
Node Cache Inconsistency
Slow Access Speed After CDN Activation
Low Traffic Hit Rate
404 Status Code
Page Display - CORS error
Resource Cache Failure
Service Level Agreement
Glossary

Smart Compression Configuration

PDF
Focus Mode
Font Size
Last updated: 2024-12-30 21:45:36

Overview

With the aid of smart compression, Tencent Cloud CDN can compress the returned resources with Gzip or Brotli according to set rules, which effectively reduces the size of transferred content and costs.
Note:
If your domain name is configured for global acceleration, the smart compression configuration will take effect globally. This configuration does not distinguish between requests from the Chinese mainland and from outside the Chinese mainland.
The file type (content-type) and Brotli compression are currently not available in regions outside the Chinese mainland.

Directions

Viewing the configuration

Log in to the CDN console, select Domain Management on the left sidebar, and click Manage on the right of a domain name to enter its configuration page. Open the Advanced Configuration tab to find the Smart Compression section. This configuration is enabled by default.
After an acceleration domain name is connected, resources with sizes ranging from 256 bytes to 2 MB with file extensions .js, .html, .css, .xml, .json, .shtml, and .htm will be compressed with Gzip by default.




Modifying the configuration

Click Modify to modify the compression rules:


Configuration limitations
Type: supports All Files, File Extension, and File Content-Type. It is set to File Extension by default.
If File Extension is selected, the maximum content length is 200 characters.
If File Content-Type is selected, the default content is as follows: text/html, text/xml, text/plain, text/css, text/javascript, application/json, application/javascript, application/x-javascript, application/rss+xml, application/xmltext, image/svg+xml, image/tiff. You can edit the content as needed. Note that you can enter up to 100 groups of content separated with semicolons (;). Each group can have up to 50 characters.
Some platforms are being upgraded and do not support the file type (content-type) and Brotli compression.
Note:
The configuration can be modified when disabled, but will not be officially deployed until it is enabled.
If Gzip and Brotli are both selected, the compressed files will be returned according to the request compression header.
If Brotli is selected only and the request compression header does not support it, the original resources will be returned without being compressed.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback