← Blog

Zstandard instead of gzip

A server setting that makes pages smaller and quicker for the phone to unpack. Browsers have accepted it since February.

Everything a server sends is squashed on the way out and unpacked by the browser at the other end. For years that meant gzip, then Brotli, which squashes harder.

There's a third one now, Zstandard, and every browser has accepted it since February.

The files come out slightly smaller than Brotli manages. The bigger difference is at the other end, where unpacking is a good deal quicker, so the phone does less work before it can get on with drawing the page. On a cheap phone that's the half that shows.

Turning it on

It's a server setting rather than anything you write into the site. Nginx and Apache both have a module for it, and the browser tells the server what it can handle, so nobody who hasn't got it notices anything.

I'd add it alongside Brotli rather than swapping. Offering both costs nothing and I'd rather not find out the hard way.

If any of it is useful on your project, say so.