#2670 - Support Brotli compression
| Identifier | #2670 |
|---|---|
| Issue type | Feature request or suggestion |
| Title | Support Brotli compression |
| Status | Completed |
| Tags |
Type: Performance (custom) |
| Handling member | Chris Graham |
| Addon | core |
| Description | Brotli compression, which is very new, may present roughly 20% improvement over gzip.
It isn't yet supported by PHP or Apache (https://en.wikipedia.org/wiki/Brotli), but when it is, we should support it as an automated upgrade from gzip compression for those users that can run it (Firefox, Chrome - but we look at the Accept-Encoding header). I don't think it needs to be configurable. |
| Steps to reproduce | |
| Funded? | No |
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".
Comments
"Javascript files compressed with Brotli are 14% smaller than gzip. HTML files are 21% smaller than gzip. CSS files are 17% smaller than gzip."
There is a PHP extension we can support:
https://github.com/kjdev/php-ext-brotli
We can also try our .htaccess trick of serving pre-heavily-compressed .br files directly if the browser accepts them, like we currently do with .gz.
EDIT: While zstd (aka zstandard) is gaining adoption, and is by a web company, it is not itself designed as an HTTP compression scheme, and nobody is picking it up as such.