0Pricing
Web Performance Optimization & Lighthouse · Lesson

Compression and Transfer Encoding

Shrink what crosses the wire using gzip and Brotli compression, the right content types, and precompression so responses arrive faster on every connection.

Why Compress?

Text assets like HTML, CSS, JS, JSON, and SVG are highly compressible. Compressing them before transfer can cut payloads by 70-90%, directly speeding up load on every network.

How Negotiation Works

The browser advertises supported algorithms with the Accept-Encoding header; the server responds with the chosen one in Content-Encoding.

Accept-Encoding: br, gzip
Content-Encoding: br

All lessons in this course

  1. HTTP/2 and HTTP/3 Fundamentals
  2. Browser and Server Caching
  3. Content Delivery Networks (CDNs)
  4. Compression and Transfer Encoding
← Back to Web Performance Optimization & Lighthouse