# Compression (gzip, brotli, zstd)

DevFeed: [Compression (gzip, brotli, zstd)](<https://devfeed.tech/articles/compression-gzip-brotli-zstd-89125.md>)

Original publisher: [Read original article](<https://specification.website/spec/performance/compression/>)

Author: Joost de Valk

Published: 2026-10-15T00:00:00Z

Content type: tutorial

Language: en

Sources: [The Website Specification](<https://devfeed.tech/sources/the-website-specification.md>)

Topics: [Compression](<https://devfeed.tech/topics/compression.md>), [Encoding](<https://devfeed.tech/topics/encoding.md>), [Page Speed Optimization](<https://devfeed.tech/topics/page-speed-optimization.md>)

Tags: [breach](<https://devfeed.tech/tags/breach.md>), [cache](<https://devfeed.tech/tags/cache.md>), [gzip](<https://devfeed.tech/tags/gzip.md>), [http](<https://devfeed.tech/tags/http.md>), [performance](<https://devfeed.tech/tags/performance.md>), [required](<https://devfeed.tech/tags/required.md>), [zstd](<https://devfeed.tech/tags/zstd.md>)

## AI overview

The tutorial explains HTTP response compression and how to configure content negotiation, precompress static assets, and maintain separate cache entries for each encoding. It recommends brotli with gzip fallback, discusses zstd support, and covers redundant compression, BREACH exposure, and verification with curl and browser DevTools.

## Source excerpt

Compress text responses with brotli where supported, gzip everywhere else. zstd is emerging. Don't compress already-compressed media.