Bread time

As my server was hitting its capacity limits, it was time to rethink the whole webstack and do some improvements. And that’s exactly where I ditched gzip in favor of Brotli.

Considering that it’s supported by the major browsers, I checked my Matomo analysis to see if I would run into any problems. As I had almost no visitors running old versions of IE, I decided to switch. All I had to do was exchanging the gzip params with the ones of Brotli which are as follows:


brotli on;
brotli_comp_level 5;
brotli_static on;
brotli_types

text/xml
image/svg+xml
application/x-font-ttf
image/vnd.microsoft.icon
application/x-font-opentype
application/json
font/eot
application/vnd.ms-fontobject
application/javascript
font/otf
application/xml
application/xhtml+xml
text/javascript
application/x-javascript
text/plain
application/x-font-truetype
application/xml+rss
image/x-icon
font/opentype
text/css
image/x-win-bitmap;

All I had to do then was compiling the module and restarting nginx. My tests gave me a saving of 10-20% in terms of page sizes. Now that’s what I call a success.

Author:

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.