Add support for BROTLI algo in pagespeed tests

632 views
Skip to first unread message

Алексей Носачев

unread,
Feb 29, 2016, 4:54:39 PM2/29/16
to pagespeed-insights-discuss
I've got both gzip and brotli compression enabled. Since pagespeed insights test is supporting only gzip as valid compression algo I have to temporarily disable brotli support on my webserver. Could you please update your tests, as it's a Google issued compression alogo and it's already supported in chrome browser. Thanks.

Rick Steinwand

unread,
Mar 2, 2016, 12:59:44 PM3/2/16
to pagespeed-insights-discuss
Sounds like you're causing more problems than fixing. I'd disable brotli compression for a year, then try it.

Browser support for brotli isn't quite there yet. http://caniuse.com/#feat=brotli

Steffen Weber

unread,
Mar 8, 2016, 8:38:53 AM3/8/16
to pagespeed-insights-discuss
Supporting brotli does not cause any harm for actual browsers. It is supported by Firefox and is currently being enabled in Google Chrome (https://bugs.chromium.org/p/chromium/issues/detail?id=452335). Only Google Page Speed Insights puts "supports both gzip and brotli" on a level with "does not support compression at all". This clearly is a bug and should be fixed.

For example, for URL http://www.computerbase.de/ Google Page Speed Insights suggests "Enable compression" for the files "main.css" and "main.js" (which are compressed using gzip or brotli depending on browser support). Google Page Speed Insights seems to assume that anything other than "gzip" equals "no compression".

Thanks,
Steffen

Joshua Marantz

unread,
Mar 9, 2016, 10:02:05 AM3/9/16
to pagespeed-insights-discuss
Brotli support has now been added to PSI !

There are still some complaints about compression on https://developers.google.com/speed/pagespeed/insights/?url=http%3A%2F%2Fwww.computerbase.de%2F but the complaints are about third party content, so I think PSI considers brotli now as valid compression on your site.

-Josh

--
You received this message because you are subscribed to the Google Groups "pagespeed-insights-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pagespeed-insights-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pagespeed-insights-discuss/eb314b33-22a4-4609-aeb9-71b443764269%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Steffen Weber

unread,
Mar 11, 2016, 5:25:15 AM3/11/16
to pagespeed-insights-discuss
Thanks!

(Yes, third-party ad servers are a completely different story.)


Am Mittwoch, 9. März 2016 16:02:05 UTC+1 schrieb Joshua Marantz:
Brotli support has now been added to PSI !

There are still some complaints about compression on https://developers.google.com/speed/pagespeed/insights/?url=http%3A%2F%2Fwww.computerbase.de%2F but the complaints are about third party content, so I think PSI considers brotli now as valid compression on your site.

-Josh
On Tue, Mar 8, 2016 at 8:38 AM, Steffen Weber <steffe...@gmail.com> wrote:
Supporting brotli does not cause any harm for actual browsers. It is supported by Firefox and is currently being enabled in Google Chrome (https://bugs.chromium.org/p/chromium/issues/detail?id=452335). Only Google Page Speed Insights puts "supports both gzip and brotli" on a level with "does not support compression at all". This clearly is a bug and should be fixed.

For example, for URL http://www.computerbase.de/ Google Page Speed Insights suggests "Enable compression" for the files "main.css" and "main.js" (which are compressed using gzip or brotli depending on browser support). Google Page Speed Insights seems to assume that anything other than "gzip" equals "no compression".

Thanks,
Steffen


Am Mittwoch, 2. März 2016 18:59:44 UTC+1 schrieb Rick Steinwand:
Sounds like you're causing more problems than fixing. I'd disable brotli compression for a year, then try it.

Browser support for brotli isn't quite there yet. http://caniuse.com/#feat=brotli

--
You received this message because you are subscribed to the Google Groups "pagespeed-insights-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pagespeed-insights-discuss+unsub...@googlegroups.com.

Rick Steinwand

unread,
Mar 11, 2016, 11:52:19 AM3/11/16
to pagespeed-insights-discuss
IISpeed has added a Brotli compression module for IIS.

Stanislas Lange

unread,
May 8, 2016, 5:06:18 AM5/8/16
to pagespeed-insights-discuss
Is brotli supported ? When I enable it, PSI shows me a complete white page : https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fangristan.fr%2F

Rick Steinwand

unread,
May 9, 2016, 8:21:30 AM5/9/16
to pagespeed-insights-discuss
Did you read Joshua Marantz's post 3 lines up?

Stanislas Lange

unread,
May 9, 2016, 12:34:02 PM5/9/16
to pagespeed-insights-discuss
Yes, so ?

Joshua Marantz

unread,
May 9, 2016, 1:21:53 PM5/9/16
to pagespeed-insights-discuss
My earlier post provides an answer to your first question "is brotli supported".  The answer is 'yes': content encoded with brotli is considered by PageSpeed Insights to be compressed, and will not lose points due to lack of gzip.

Now as to your statement that your page is blank, I do not know whether that's related to Brotli or not.  If you temporarily change your server to only encode with gzip even if the accept-encoding includes 'br', does PageSpeed Insights then show a non-blank page?

-Josh

--
You received this message because you are subscribed to the Google Groups "pagespeed-insights-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pagespeed-insights-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pagespeed-insights-discuss/aa66b9f4-93a5-44b4-a1fb-a94851afc446%40googlegroups.com.

Stanislas Lange

unread,
May 10, 2016, 5:03:31 PM5/10/16
to pagespeed-insights-discuss
Yes, the problem only happens when Brotli is enabled, that's why I'm asking ^^


Le lundi 9 mai 2016 19:21:53 UTC+2, Joshua Marantz a écrit :
My earlier post provides an answer to your first question "is brotli supported".  The answer is 'yes': content encoded with brotli is considered by PageSpeed Insights to be compressed, and will not lose points due to lack of gzip.

Now as to your statement that your page is blank, I do not know whether that's related to Brotli or not.  If you temporarily change your server to only encode with gzip even if the accept-encoding includes 'br', does PageSpeed Insights then show a non-blank page?

-Josh
On Mon, May 9, 2016 at 12:34 PM, Stanislas Lange <lange.s...@gmail.com> wrote:
Yes, so ?

Le lundi 9 mai 2016 14:21:30 UTC+2, Rick Steinwand a écrit :
Did you read Joshua Marantz's post 3 lines up?

--
You received this message because you are subscribed to the Google Groups "pagespeed-insights-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pagespeed-insights-discuss+unsub...@googlegroups.com.

Dennis Povshedny

unread,
Aug 12, 2016, 2:52:03 PM8/12/16
to pagespeed-insights-discuss
Now, half year later, the request is still actual. If only I turning on Brotli, Google PageSpeed tool analysis is failing to scan.

As a workaround, I am temporary disabling Brotli before analysis. Just a note for those who, like me, landed here searching for such cases.

Joshua Marantz

unread,
Aug 12, 2016, 4:38:15 PM8/12/16
to pagespeed-insights-discuss
To clarify, are you seeing PageSpeed request your site *without* Accept-Encoding:br, but you are returning a brotli-encoded response?

If that's the case, then it's your bug.

But if PSI sends Accept-Encoding:br, and you respond with Brotli, and PSI dings you for not compressing the response, then it's PSI's bug.

Which of those is it?  Or some other combination I haven't thought of?

-Josh

--
You received this message because you are subscribed to the Google Groups "pagespeed-insights-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pagespeed-insights-discuss+unsub...@googlegroups.com.

Dennis Povshedny

unread,
Aug 12, 2016, 8:01:45 PM8/12/16
to pagespeed-insights-discuss
Josh,
I didn't sniffed PSI requests in details. But I can provide you my testlist for both configurations. The items (b) and (e) are different while ideally only (b) shall differ.

1) Server config: gzip only enabled
a. Correctly reacts to [wget -S --header='Accept-Encoding: gzip'], gives compressed data
b. Returns uncompressed to [wget -S --header='Accept-Encoding: br'], gives compressed data
c. Accessible via Chrome, Firefox and Webkit
d. Accessible via text browsers like Lynx/Elinks
e. Displayed good in PSI

2) Server config: gzip and brotli enabled
a. Correctly reacts to [wget -S --header='Accept-Encoding: gzip'], gives compressed data
b. Correctly reacts to [wget -S --header='Accept-Encoding: br'], gives compressed data
c. Accessible via Chrome, Firefox and Webkit
d. Accessible via text browsers like Lynx/Elinks
e. Displayed as empty site in PSI

Hope this helps!

Joshua Marantz

unread,
Aug 12, 2016, 9:09:43 PM8/12/16
to pagespeed-insights-discuss
To clarify, can you show the headers & data for these two cases?

a. Correctly reacts to [wget -S --header='Accept-Encoding: gzip'], gives compressed data
b. Correctly reacts to [wget -S --header='Accept-Encoding: br'], gives compressed data

Can we verify that you are responding with the correct content-encoding and that the gzip data is in gzip format, and the brotli data is in brotli format?

What are you doing server-side to generate the Brotli data?

-Josh

To unsubscribe from this group and stop receiving emails from it, send an email to pagespeed-insights-discuss+unsubsc...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "pagespeed-insights-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pagespeed-insights-discuss+unsub...@googlegroups.com.

Andrew Welch

unread,
Aug 15, 2016, 9:03:34 PM8/15/16
to pagespeed-insights-discuss
This is apparently STILL a problem:


ServerPilot claims that Google has multiple issues with their Brotli implementation.

Mushan Yang

unread,
Aug 18, 2016, 9:33:31 AM8/18/16
to pagespeed-insights-discuss
Fixed. Thanks.

Dennis Povshedny

unread,
Aug 18, 2016, 12:18:00 PM8/18/16
to pagespeed-insights-discuss
Thanks Andrew for providing additional bugreports,

many thanks to Josh and Mushan Yang to addressing problem and fixing it.

Everything works nicely now for me on my end for the brotli-enabled website.
Reply all
Reply to author
Forward
0 new messages