Compression (gzip, brotli, zstd)
type: TechArticle
description: Compress text responses with brotli where supported, gzip everywhere else. zstd is emerging. Don't compress already-compressed media.
language: en
is part of: Web Specification Studio
author: Web Specification Studio
publisher: Web Specification Studio
license: https://creativecommons.org/licenses/by/4.0/
date modified: 2026-07-09T00:00:00.000Z
citation: RFC 7932 — Brotli Compressed Data Format
  type: CreativeWork
  publisher: IETF
citation: MDN — Accept-Encoding
  type: CreativeWork
  publisher: MDN
citation: MDN — Content-Encoding
  type: CreativeWork
  publisher: MDN
citation: RFC 8878 — Zstandard Compression
  type: CreativeWork
  publisher: IETF

Web Specification Studio
type: WebSite

Web Specification Studio
type: Organization

breadcrumb
type: BreadcrumbList
item list element: Home
  type: ListItem
  position: 1
  item: https://webspecification.com/
item list element: Spec
  type: ListItem
  position: 2
  item: https://webspecification.com/spec/
item list element: Performance
  type: ListItem
  position: 3
  item: https://webspecification.com/spec/performance/
item list element: Compression (gzip, brotli, zstd)
  type: ListItem
  position: 4
  item: https://webspecification.com/spec/performance/compression/