Glenn Linderman added the comment: 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. ---------- nosy: +v+python _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30576> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com