Gzip and Brotli are compression algorithms used by web servers to reduce the size of files (HTML, CSS, JavaScript, JSON) before sending them to the browser. Smaller files mean faster downloads and a better user experience.
Gzip
Gzip has been the standard web compression method since the late 1990s. It typically reduces file sizes by 70-90%. When a browser sends a request with Accept-Encoding: gzip, the server compresses the response and adds Content-Encoding: gzip to the response headers.
Brotli
Brotli is a newer compression algorithm developed by Google (2015). It offers 15-25% better compression ratios than Gzip for text-based content. Brotli uses the br encoding identifier:
Accept-Encoding: gzip, deflate, br
Content-Encoding: br
Comparison
- Compression ratio — Brotli compresses 15-25% better than Gzip
- Speed — Gzip compresses faster at lower levels; Brotli is better for pre-compressed static assets
- Browser support — Both are supported by all modern browsers
- HTTPS requirement — Brotli requires HTTPS; Gzip works with both HTTP and HTTPS
Impact on WordPress
A typical WordPress page can be 50-200 KB of HTML. Without compression, every byte must be transferred. With Gzip or Brotli:
- HTML pages shrink from ~100 KB to ~20 KB
- CSS and JavaScript files see similar or better reductions
- Page load times decrease noticeably, especially on mobile networks
What InspectWP Checks
InspectWP checks the Content-Encoding response header to determine whether your WordPress site uses compression. Sites without compression are flagged as having a performance issue.