Overview

Gzip is the most common compression algorithm used on the web. It is based on the DEFLATE algorithm, which combines LZ77 and Huffman coding. When a browser sends a request with the Accept-Encoding: gzip header, the server can respond with a gzipped version of the resource.

Benefits

  • Significant Savings: Can reduce the size of HTML, CSS, and JavaScript files by 70% or more.
  • Universal Support: Supported by virtually all web browsers and servers since the early days of the web.
  • Low Overhead: Fast enough to be performed on-the-fly by web servers.

Comparison

While Gzip is the industry standard, newer algorithms like Brotli offer even better compression ratios for most web content.

Related Terms