Recognize gzip in web performance test

Hi awesome community,

I am setting up a website using Cloudflare as the DNS. I am using the free option for now.
It is generated as a static site using Nuxt3 (https://v3.nuxtjs.org/) am we are doing it in small iterations where we will like to comply with web performance settings.
When settings are in order, we will move the full site live.

It is performing good with Google PageSpeed and GT Metrix, but Pingdom Tools keep complaining that gzip is not enabled. I have enabled Brotli, but is there a way to make Pingdom Tools recognise gzip?

You can see the placeholder site here: https://amforsikring.dk

Cheers
Christoffer

Greetings :slight_smile:

Thank you for asking.

Adding a cite from the another topic:

If you disable Brotli at Cloudflare dashboard → Speed → Optimization, then the HTTP header content-encoding: should return content-encoding: gzip.

My guess is, if Pingdom Tools uses that way to check if the content is being served / returned as a gzip, then you’d have to keep the “Brotli” feature disabled :thinking:, which I don’t advise as I’d rather keep it enabled from my point of view.

I suggest you to test this out first, if true, then that’s the answer.

I don’t know really why and if, they don’t recognize / support brotli as content-encoding: br already. I mean, soon it’ll be 2023, what they’re waiting for? :smiley:

I’d suggest using and testing with other tools such as:

Sharing a useful Article at Cloudflare about Brotli / content compression:

2 Likes

Thanks for the suggestions, @fritex ! :pray:

I will definitely try these options out. And also try to use the other tools to compare results; you have good point that Pingdom Tools needs to recognize brotli :wink:

But that is not recommended.

One has to realise that the real problem here Pingdom is, not Cloudflare. The problem roots from them and therefore shall not be concealed at Cloudflare’s end.

@enovato if you really care about a fast and good ranking site you definitely do not run Pingdom on it :slight_smile: There are so many good benchmark tools which work properly and have been maintained in the last 5 years - unlike Pingdom.

Here are some little examples, why Pingdom must be the problem, and why it is not Cloudflare’s fault.

Command 1:

curl -sI https://code103.hotmann.de/app.min.css | grep "content-encoding"

Return1:
"" (nothing)

Command 2:

curl -H "Accept-Encoding: gzip" -sI https://code103.hotmann.de/app.min.css | grep "content-encoding"

Return1:
content-encoding: gzip

Command 2:

curl -H "Accept-Encoding: br" -sI https://code103.hotmann.de/app.min.css | grep "content-encoding"

Return1:
content-encoding: br

So Cloudflare serves every user according to what he is capable of handling. If your browser does not state that he can use brotli, he will not be served brotli.
If a client signals that he can handle multiple encoding-types, then he will be served the best one.

So what happened here is, that if a client sends a request like:

curl -H "Accept-Encoding: gzip, br" -sI https://code103.hotmann.de/app.min.css | grep "content-encoding"

he mostly will be served:

content-encoding: br

As Brotli is superior in basically all text-based compressions.
So if Pingdom runs benchmarks with br in their "Accept-Encoding" header, then yes… ofc they will be served according to what they say they can handle.
Beside that (I know, everyone says that) you should not focus on benchmarks too much, but just as much as they are reasonable. Not using modern technique is definitely not reasonable!
Have a quick search about “brotli vs gzip” and decide yourself, what you want to stick with. Very likely you want to have brotli enabled always, and gzip as fallback.

So here my advice:

  1. stop using Pingdom, it really is a bad tool. (@fritex already mentioned really good tools)
  2. go with what makes your site measurable fast, not what makes it look better on paper. As Pingdom does not tell you why not using gzip is bad, you really shall ignore such misleading statements.
  3. leave brotli enabled at Cloudflares - it greatly speeds up your site.
  4. note that Cloudflare does not use gzip and brotli at their best settings. Guess it was:
    4.1. Brotli lvl. 6
    4.2. gzip lvl. 4
    (could be wrong - don’t quote me on this)

So if you want to get the very best out of it, you need to do it on your own. then you can go for brotli lvl 11 (extreme compression) and gzip lvl 9 (best for gzip).
Note that this really can be worth it, but now you need to turn off compression at Cloudflare, as Cloudflare otherwise would re-compress it at its own settings.

5 Likes

Thank you so much for that elaborate answer, @M4rt1n! :pray:

I totally agree that performance should be within reason and not too obsessive. My CI/CD does automatically minify and compress the files, but I can see that the server seems not to serve them, so I will try to experiment with various settings before going live.
Probably, I will stick with the default Cloudflare settings and keep things simple and easy :wink:

I tried some of the web based tools that @fritex suggested and it seems to perform really good with Cloudflare brotli enabled, so that will be my initial choice and if things get heavier at our site, I will experiment with more advanced settings.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.