All Products
Search
Document Center

Edge Security Acceleration:Content compression

Last Updated:May 08, 2025

Edge Security Acceleration (ESA) provides several compression methods to compress data. Compressed data shortens loading time and saves bandwidth.

Compression methods

ESA provides three compression methods: Gzip, Brotli, and Zstd. Each method focuses on different aspects such as compression efficiency, decompression speed, and compatibility, making them suitable for different scenarios.

Method

Speed

Compatibility

Scenarios

Gzip

Fast compression and medium decompression

High

Common web services

Brotli

Slow compression and high-speed decompression

Medium

Static resource optimization

Zstd

Very fast compression and decompression

Low

Real-time streaming data processing

Before you begin

  • Gzip compression is compatible with most browsers. However, Brotli and Zstd may not work with some older browser versions. Check browser compatibility.

  • Compression changes the MD5 hash of the file. If the origin file is configured with MD5 validation, disable compression for it.

Compression won't take effect if:

  • Files on the origin server are smaller than 1 MB or larger than 10 MB.

  • Responses from origins carry either the Content-Encoding: or cache-control: no-transform header.

  • The client's request header Accept-Encoding:doesn't support gzip, br, or zstd.

Supported file formats

Files in the following formats can be compressed:

  • text/xml

  • text/plain

  • text/css

  • application/javascript

  • application/x-javascript

  • application/rss+xml

  • text/javascript

  • image/tiff

  • image/svg+xml

  • application/json

  • application/xml

Image files in formats such as PNG, JPG, and JPEG are already compressed. Use Image transformations to further reduce their size.

Enable compression

  1. In the ESA console, choose Websites and click the name of the website you want to manage.

  2. In the left-side navigation pane, go to Speed and Network > Optimize > Speed Optimization.

  3. Turn on the Gzip, Brotli or Zstd switch. When multiple methods are enabled, only one takes effect. The priority is Zstd > Brotli > Gzip.