-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Beware: GZIP + Brotli #48
Comments
Do you know what is the priority order and how it's set when both gzip and Brotli are active? Thank you for letting me know. |
Nginx takes the gzip-file and compresses it again with Brotli on the fly. |
My understanding was that it was an alternative to GZIP. Not that it used the GZIP file and used Brotli after it. I did not see that in the documentation. Can you educate me on your sources? That way, I can code it properly. |
Ok, I get what you mean. My main concern now is: when GZIP and BR are acceptable encoding, how do I ask Nginx (via the configuration file I made) what is the encoding that it will use ? Then, if it's "BR", the code suggestion you did make sense. If it's GZIP, we can use the code as is. The question remains: when both are available, how can I know which one did Nginx pick ? This is what I need to figure. |
I think if Brotli is active and the client accept it, it will take brotli. |
I understand. Now, I need a confirmation of that behaviour. :-) |
Some client (Google Search Console + Google Crawler probably) have problems decoding with Brotli compressed gzip-files. If Brotli is active on the server.
At the moment the rocket-nginx.conf just checks if the client accept gzip and than serves the _gzip-file which will compressed again with Brotli:
# Is GZIP accepted by client ?
if ($http_accept_encoding ~ gzip) {
set $rocket_encryption "_gzip";
}
For this reason I check if the client accept Brotli and unset $rocket_encryption:
# Is Brotli accepted by client ?
if ($http_accept_encoding ~ br) {
set $rocket_encryption "";
}
The text was updated successfully, but these errors were encountered: