HTTP compression

in Performance Tags: brotlicompressiongzip

On Hypernode we automatically enable HTTP compression, colloquially also known as ‘gzip compression’, at the nginx level. By doing so we can ensure that Magento’s output, as well as any static files, are always transferred as fast as possible, automatically speeding up your webshop.


gzip compression is automatically enabled on all responses over a certain size, for most mime types. Because of the overhead of compressing/decompressing, tiny files don’t receive any compression

PHP settings

Because we do all compression centralized in nginx itself, you should not send compressed output from PHP, as nginx will then de-, and recompress the output. HTTP compression in nginx is already highly optimized for Magento.
Unlike other hosting environments, you should not set zlib.output_compression = On in your PHP setting, as this will actually slow down your site.


While HTTP compression is often referred to as ‘gzip compression’, it actually supports many different types of compression, one of which is ‘Brotli’. Brotli is a new compression algorithm designed by Google specifically for HTTP steam compression. It’s supported by all modern browswers. Brotli compression is preferred over gzip compression, and will be used with any client that explicitly indicates to the webserver that it supports Brotli.

Brotli provides 20%-26% better compression than other existing compression algorithms. This will especially be beneficial to users visiting your webshop with their mobile device. The reason behind this is that the webpages will be smaller in size and will therefore load faster and use less of their mobile data.