ESA compresses static resources to reduce data transfer sizes and improve page load speeds.
Introduction
ESA provides three compression methods: Gzip, Brotli, and Zstd. They differ in compression efficiency, decompression speed, and compatibility, making them suitable for different scenarios.
|
Compression type |
Compression efficiency |
Compatibility |
Use case |
|
Gzip |
Fast compression, medium decompression speed |
High |
General web services |
|
Brotli |
Slow compression, high decompression speed |
Medium |
Static resource optimization |
|
Zstd |
Very fast compression, very fast decompression |
Low |
Real-time stream data processing |
The Entrance plan only supports Zstd compression.
Notes
-
If you enable Gzip, Brotli, and Zstd at the same time, they are applied in the following order: Zstd > Brotli > Gzip.
-
ESA supports compression for the following file types:
text/xml,text/plain,text/css,application/javascript,application/x-javascript,application/rss+xml,text/javascript,image/tiff,image/svg+xml,application/json, andapplication/xml.
Cases where compression rules do not take effect
Compression rules are not applied in certain cases because of conflicting settings on the origin server or client.
For origin server
-
Gzip or Brotli compression is applied only to files from the origin server that are between 1 KB and 10 MB. Files outside this size range are not compressed.
-
If the response from the origin server includes the
Content-Encodingheader, ESA does not apply compression. -
If the response from the origin server contains the
cache-control: no-transformHTTP header, ESA does not apply compression.
For client
If a client does not support the configured compression algorithm, the response is not compressed. Client support is indicated by the Accept-Encoding request header.
Procedure
-
In the ESA console, select Websites, and then click the target site in the Website column.
-
In the navigation pane on the left, choose .
-
Select the Speed Optimization tab. Then, turn on the Gzip, Brotli, and Zstd switches as needed.

Site-level and rule-based features mapping
Configurations added through site-level features apply to all requests for a given site. To enable a feature for specific requests only, use rule-based features. Define rule conditions that detect specific parameter values in user requests. This provides precise control over which requests the rule configuration affects.
|
Site-level feature |
Corresponding rule-based feature |
|
Gzip |
|
|
Brotli |
|
|
Zstd |