Compressing HTTP Messages with Gzip
Last updated April 28, 2023
Heroku doesn’t modify HTTP requests or responses that are sent by your application. This means that features like HTTP compression are your application’s responsibility.
You can easily serve Gzipped HTTP messages directly from your application code. Here are documentation links for popular Gzip compression libraries for all Heroku-supported languages:
Language | Libraries |
---|---|
Node.js | compression (Express middleware), Zlib |
Ruby | Zlib |
Python | gzip (standard library), django.middleware.gzip |
PHP | gzencode |
Java | Spring, Tomcat, Jetty |
Scala | Play |
Clojure | Jetty |
Go | gzip |