4

I used this Google tool to test my web site.

When I got the report it recommended the following..

Compress resources with GZIP See how to enable GZIP compression »

When I look at the response of my html css, or js files in chrome dev tools, I see the following encoding..

content-encoding:br

Looking up br (for example here), br seems to be another compression, an alternative to gzip.

Also, when I use a tool such as this, is suggest my site is compressed.

I do notice my images don't have this encoding, but they are all either .png or .jpg so I imagine you would not compress much anyway.

Does anyone know why the Google tool would be telling me to compress my "resources" when my site seems to already be compressed?

  • Such a errors I will ignore completely, I am not sure weather br is better then gzip or not, but if you think it is better, then ignore those errors. Googlebot don't look into what compression method you've used, they just care about your page speed, if it is good then all are good. – Goyllo Aug 20 '17 at 13:06
  • 2
    If that tool does not send an Accept-Encoding request header that contains br and your site only returns br encoded content, then the tool is not going to receive a compressed response (at least, it shouldn't). It would seem only the latest "desktop" browsers support br compression. I don't know the state of "mobile" browsers - maybe these are lagging behind(?), which is why the "mobile" test tool is also lagging? Chrome Desktop does support br compression, which is why you see a compressed response. – MrWhite Aug 20 '17 at 14:23
5

Compress resources with GZIP

This is another one of those things where new technology is being shoved into our faces and some companies and/or tools aren't setup to handle it (such as the Google page speed insights). After looking at the new compression info, it seems only newer web browsers support it.

A large number of tools and web servers still support GZIP compression, but some servers (including nginx as per your link on the br compression) don't have it where one can enable it in the server.

Because the goal of a website is to present information to users from around the world, we have to try to make much of the world happy by creating two versions of a webpage. One version being compressed with GZIP and the other version not compressed at all for browsers that don't support compression.

When the user loads the page, the browser tells the server what compression methods it can handle (example: GZIP) and if the server also supports it, then the content is downloaded compressed then extracted on the user's computer and then the HTML is processed in the browser. If however the user's browser can't handle the compression then the server should delivered the uncompressed version. This is better than users seeing errors.

  • Thanks for that. So the tool may not be reporting correctly. I tried another gzip specific test and it reported a positive to gzip compression. – peterc Aug 24 '17 at 22:54
  • You want to make your site work for as many web browsers as possible. You might have a very new browser that you do all your website testing in that does support the br compression. A number of us such as myself have web browsers that support gzip and possibly the deflate compression methods. You may want to make a suggestion to google somehow to inform users that their tool only checks to see that the webpage is gzip compressed. – Mike Aug 24 '17 at 23:12
  • I think I will do that, otherwise, you are getting incorrect information, and spend time trying to find out what is wrong. Cheers – peterc Aug 25 '17 at 0:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.