Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Chrome support Brotli? (Accept-Encoding does not contain br)

Can I use page says that Chrome supports brotli for some time now. I would think that the Accept-Encoding string would be like this:

Accept-Encoding:gzip, deflate, sdch, br

But I checked on a request to StackOverflow e.g. and it does not contain brotli:

Accept-Encoding:gzip, deflate, sdch

I suppose most web servers won't really return you brotli if it's not in Accept-Encoding, so it's kind of partially supported only it seems.

Is it going to be added later or there is some trick I don't know of?

like image 883
Ilya Chernomordik Avatar asked Nov 14 '16 07:11

Ilya Chernomordik


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.

Why is Brotli only HTTPS?

For both of these browsers, Brotli is only used for HTTPS requests, not for plain HTTP requests. The reason only HTTPS is supported is because many network proxies around the world expect HTTP compression to always be gzip, so using other types of compression can cause websites to break.

Do all browsers support gzip?

gzip compressionThis HTTP header is supported in effectively all browsers.


1 Answers

Brotli only works over HTTPS

There are many blog posts about this if you Google it. Here's one:

https://samsaffron.com/archive/2016/06/15/the-current-state-of-brotli-compression

Brotli is HTTPS only

If you visit a site over HTTP your browser will not accept the br encoding. The reasoning for this is documented at the end of the chromium issue.

The Chromium issue linked is here:

https://bugs.chromium.org/p/chromium/issues/detail?id=452335

StackOverflow can be accessed on a non-HTTPS connection

Make sure you are going to https://stackoverflow.com instead of http://stackoverflow.com

EDIT: StackOverflow can no longer be accessed on non HTTPS connection.

like image 133
theyetiman Avatar answered Oct 16 '22 14:10

theyetiman