Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is Brotli not supported on HTTP?

I noticed an odd thing where apparently Firefox says it supports Brotli on HTTPS, but not HTTP? As Brotli is like gzip but more efficient, why would it limit it to HTTPS? On a HTTPS tab I see:

Accept-encoding: gzip, deflate, br

is sent. But on other site I see no br. Why can't it do Brotli compressed HTTP?

like image 411
NoBugs Avatar asked May 09 '17 06:05

NoBugs


People also ask

Is Brotli supported by all browsers?

Brotli is primarily used by web servers and content delivery networks to compress HTTP content, making internet websites load faster. A successor to gzip, it is supported by all major web browsers and has become increasingly popular, as it provides better compression than gzip.

Which is better Brotli or gzip?

Since Brotli was designed to compress streams on the fly, it is faster at both compressing content on the server and decompressing it in the browser than in gzip. In some cases the overall front-end decompression is up to 64% faster than gzip.


1 Answers

The reason to limit brotli to secure contexts is that intermediaries (specifically, buggy proxies and content scanners) tend to behave very poorly when they encounter non-deflate/gzip Content-Encoding. The Google guys discovered this when they rolled out ‘sdch’ and ‘bzip2’ before that; they ended up pulling bzip2 partly for that reason and sdch has a number of hacks that they had to put in. By requiring HTTPS for brotli, they can head off this problem in most cases because comparatively few content-scanners MITM HTTPS streams

Taken from https://hacks.mozilla.org/2015/11/better-than-gzip-compression-with-brotli/

like image 144
exussum Avatar answered Nov 16 '22 02:11

exussum