Closed GuillaumeRossolini closed 6 years ago
[It was suggested to me on Twitter that I open an issue for this.]
@GuillaumeRossolini Thank you for taking the time to open this issue.
Now about my issue: the http-compression hint asked for gzip and got that encoding (not zopfli), but it also could have asked for brotli ... it's about gzip-compatible VS brotli.
The http-compression
hint does a bunch of tests, but in essence it will recommend Zopfli over HTTP , and depending on the targeted browsers and Brotli support, Brotli over HTTPS.
However, you should also keep in mind that servers should respect the request headers. If the user agent advertises that it only supports gzip (even over HTTPS), then the server shouldn't respond with something that is not gzip compatible (such as Brotli).
In your case, it wasn't that it preferred gzip/Zopfli over Brotli, it probably just saw that:
Hope that that makes things clear.
https://webhint.io/scanner/da70cbb9-a1c5-4f8f-9911-436607af5cd4
@GuillaumeRossolini Good work on reducing the issues! 🎉
I forgot to say that
The part that makes sense is:
when gzip compression was requested it didn't get Zopfli, so it complained
I forgot to say that ... The part that makes sense is:
@GuillaumeRossolini I do apologize, but I don't really understand how to interpret your last comment. Are things clear now, or do you still think something is not recommended correctly?
Yes, your first comment explained why I got this warning. Thank you.
Hi,
[It was suggested to me on Twitter that I open an issue for this.]
At my company, we compress our assets different ways: first gzip, then brotli and lzma, and finally we overwrite the gzip file with a zopfli version. Our compression pipeline was broken for a while, so gzip and brotli worked fine but zopfli and lzma didn't happen. That was sort of ok since zopfli was just an enhancement over gzip, and lzma is used by nobody these days because of brotli taking off. And I don't think we have a rule to actually send any lzma files anyway...
Now about my issue: the
http-compression
hint asked for gzip and got that encoding (not zopfli), but it also could have asked for brotli and I was lead to understand that this should have been the case here: https://webhint.io/scanner/ad6908fd-a4e2-4c70-99f0-2ec2ca0c9e7bTo be clear, at the time of the report above, the gzip compression was indeed gzip when it could have been zopfli. That's now fixed on our end. That's not the current issue, it's about gzip-compatible VS brotli.
Examples:
(Yes the "last-modified" dates are not optimal, it's just rsync having lazy rules)