Regina Schaukrug: Inhalte komprimiert übertragen

Beitrag lesen

The gzip encoding is the only one supported to ensure complete compatibility with old browser implementations. The deflate encoding is not supported, please check the zlib's documentation for a complete explanation.

Apache 2.4 Handbuch zu mod_deflate.

Das verlinkt unter "zlib's documentation" zu

  1. What's the difference between the "gzip" and "deflate" HTTP 1.1 encodings?

"gzip" is the gzip format, and "deflate" is the zlib format. They should probably have called the second one "zlib" instead to avoid confusion with the raw deflate compressed data format. While the HTTP 1.1 RFC 2616 correctly points to the zlib specification in RFC 1950 for the "deflate" transfer encoding, there have been reports of servers and browsers that incorrectly produce or expect raw deflate data per the deflate specficiation in RFC 1951, most notably Microsoft. So even though the "deflate" transfer encoding using the zlib format would be the more efficient approach (and in fact exactly what the zlib format was designed for), using the "gzip" transfer encoding is probably more reliable due to an unfortunate choice of name on the part of the HTTP 1.1 authors.

Bottom line: use the gzip format for HTTP 1.1 encoding.

Im Hinblick auf die obige Warnung und darauf, dass womöglich einige Clients (Nicht nur ältere Browser, auch Suchmaschinen und vielleicht gewollte Bots, wg. Virenschutzes oder Inhaltsbegrenzung entpackende Proxys) mit einer Kompression a la Zopfli, Brotli und Co. noch nicht klar kommen wäre ich da derzeit noch konservativ, weil die nach meinen Prämissen gewichtete Gegenüberstellung von Aufwand, Nutzen und Risiken in Richtung "let it bee" zeigt.