Response compression
How Easel CDN compresses responses with Brotli and gzip.
Easel CDN compresses eligible responses at the edge based on the client Accept-Encoding header. Compression reduces transfer size for HTML, CSS, JavaScript, JSON, and other text-like content.
Preferred algorithms
When the client advertises support, Easel prefers:
- Brotli (
br) - gzip
If the client does not send Accept-Encoding, or only requests encodings Easel does not apply, the response is sent uncompressed.
When compression applies
Easel compresses a response when all of the following are true:
- The client accepts
brorgzip. - The response is not already encoded (
Content-Encodingis empty). - The response is not a partial range response.
- The body is large enough to benefit (at least 256 bytes for complete-body responses).
- The
Content-Typeis on the compression allowlist. - The compressed body is smaller than the original.
When Easel applies compression, it sets Content-Encoding and merges Vary: Accept-Encoding so caches distinguish encodings correctly.
Allowlisted content types
Easel compresses common text and structured formats, including:
- Application: JSON and related (
json,ld+json,manifest+json, …), JavaScript, XML feeds, WASM, and similar - Text: HTML, CSS, JavaScript, plain text, markdown, CSV, and similar
- Images: SVG, BMP, and ICO (not JPEG, PNG, WebP, or video)
- Fonts: OpenType (
otf) and TrueType (ttf)
Already-compressed formats such as JPEG, PNG, WebP, MP4, and WOFF2 are not re-compressed. Compressing them again usually wastes CPU and can increase size.
Checking compression
Inspect the response in your browser or with curl:
Look for Content-Encoding: br or Content-Encoding: gzip.