Could you please also add $wgUseKeepUncompressed or so? This is a feature request related to $wgUseGzip and $wgUseBrotli (T254743)
Quote compression (bold is mine)
If compression is enabled, the cache files are saved as .html.gz. Browsers that advertise support for gzip in their Accept-Encoding field will be given the gzipped version straight; for those browsers that don't, we unzip the data on the fly and send them the plaintext.
That sounds rather inefficient having to keep uncompromising. Also needless CPU exhaution DDOS vector.
When $wgUseKeepUncompressed is set, keep the plain .html file.
When using all three optoins
- $wgUseGzip
- $wgUseBrotli (T254743)
- $wgUseKeepUncompressed
The following would happen:
- /var/www/w/cache/Documentation.html
- /var/www/w/cache/Documentation.html.gz
- /var/www/w/cache/Documentation.html.br
Then one could use nginx gzip_static on;, brotli_static on (or the apache equivalents).
Alternatively $wgUseDeletePlainHtml could be considered or drooping deletion of uncompressed file by default.