ESA compresses static resources to reduce transfer sizes and speed up page loading.
Introduction
ESA provides three compression methods: Gzip, Brotli, and Zstd. Each method offers different trade-offs in compression efficiency, decompression speed, and compatibility.
|
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 may not take effect in certain cases due to conflicting settings on the origin server or client.
For origin server
-
Gzip or Brotli compression applies only to origin server files between 1 KB and 10 MB. Files outside this range are not compressed.
-
If the origin server response includes the
Content-Encodingheader, ESA does not apply compression. -
If the origin server response 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 returned uncompressed. 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
Site-level configurations apply to all requests for a site. To apply a feature to specific requests only, use rule-based features. Define rule conditions that match specific parameter values in user requests for precise control over which requests the configuration affects.
|
Site-level feature |
Corresponding rule-based feature |
|
Gzip |
|
|
Brotli |
|
|
Zstd |