Message295562
I don't understand fully what you are planning here: to pre-compress the files, or to compress on the fly as mentioned by another commenter?
I've implemented, in a CGI behind http.server, both .gz and .br (gzip and brotli) compression, following these rules:
User requests file xyz
If xyz doesn't exist, then look for xyz.gz or xyz.br. If one of them exists, then serve it. But if the browser doesn't support gzip or br (as appropriate) then decompress on the fly, otherwise set the appropriate Content-Encoding, and send the compressed file.
This has worked out well. Of course, .br is only supported for https: transfers. Most browsers support it now, except Apple. |
|
Date |
User |
Action |
Args |
2017-06-09 19:01:09 | v+python | set | recipients:
+ v+python, quentel, martin.panter |
2017-06-09 19:01:09 | v+python | set | messageid: <1497034869.51.0.0297255665478.issue30576@psf.upfronthosting.co.za> |
2017-06-09 19:01:09 | v+python | link | issue30576 messages |
2017-06-09 19:01:09 | v+python | create | |
|