How To Enable GZip Compression on Heroku

What is GZip Compression?

GZip is the standard compression algorithm used to shrink the size of HTTP requests and speed up how fast they’re delivered.

GZip is widely supported but less efficient than newer algorithms like Brotli Compression, which Expedited WAF also supports.

While this is technically true, it somewhat undersells the point - Brotli compression is currently supported on everything from five-year-old Android phones to Samsung Internet Connected Refrigerators.

Expedited WAF will negotiate with each connecting web request to choose the most performant compression algorithm.

Prerequisites

What you need to get started:

  1. Expedited WAF add-on is set up in front of your application.

How To Enable GZip Compression on Heroku

Enable GZip compression from the Site Speed Up page of your Expedited WAF dashboard:

Resources

Learn more about HTTP2