View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0002670||Composr||core||public||2016-06-19 17:05||2019-12-11 21:38|
|Reporter||Chris Graham||Assigned To||Chris Graham|
|Fixed in Version|
|Summary||0002670: Support Brotli compression|
|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.
|Tags||Roadmap: v12, Type: Performance|
|Time estimation (hours)||4|
Brotli is similar to gzip, but uses an inbuilt dictionary optimized for web traffic.
There is a PHP extension we can support:
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.
Interesting/relevant note - Brotli is HTTPS-only. This is because they figure proxies will cache Brotli content served under HTTP and cause all kinds of bugs for UAs not supporting it.
Also see https://github.com/kjdev/php-ext-zstd
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.
This is now implemented. It does not depend on Apache or PHP supporting Brotli, as I've taken a different approach. The old gzip option is now an output compression option, and you can select to output Brotli (which falls back to gzip if needed). If there's no PHP support for Brotli it will encode via shell_exec to the brotli executable (EDIT: but not for the main HTML output, as you cannot set an output_filter to a user-defined function or set one at run-time, and output buffers are not appropriate for implementing compression as they may process multiple times).
|2016-06-19 17:05||Chris Graham||New Issue|
|2016-06-19 17:05||Chris Graham||Tag Attached: Type: Performance|
|2017-04-08 14:44||Chris Graham||Description Updated||View Revisions|
|2019-06-27 19:23||Chris Graham||Summary||Support Brotli compression (holding issue) => Support Brotli compression (on hold)|
|2019-09-30 22:35||Chris Graham||Note Added: 0006098|
|2019-09-30 22:35||Chris Graham||Summary||Support Brotli compression (on hold) => Support Brotli compression|
|2019-11-14 22:04||Chris Graham||Tag Attached: Roadmap: v12|
|2019-11-27 19:55||Chris Graham||Note Added: 0006188|
|2019-11-27 19:57||Chris Graham||Note Edited: 0006188||View Revisions|
|2019-12-10 23:57||Chris Graham||Note Added: 0006217|
|2019-12-11 02:27||Chris Graham||Note Edited: 0006217||View Revisions|
|2019-12-11 18:31||Chris Graham||Assigned To||=> Chris Graham|
|2019-12-11 18:31||Chris Graham||Status||non-assigned => resolved|
|2019-12-11 18:31||Chris Graham||Resolution||open => fixed|
|2019-12-11 18:31||Chris Graham||Note Added: 0006219|
|2019-12-11 21:38||Chris Graham||Note Edited: 0006219||View Revisions|