Using gzip with compressible static assets makes sense. Less on disk, less in memory, less on the wire.
Does Caddy look for pre-compressed files in the way that Nginx does? I.e. if there are both
style.css.gz on disk, when a request comes in for
style.css, the response can vary to use
style.css.gz instead. This means the compression only needs to be done once (e.g. just after compiling Less/SASS files), and this happens offline before the server is involved.
Good idea, issue a feature request on github!
https://github.com/mholt/caddy/issues/1282 - I will work on that in following days It will save CPU for me.
Here you go https://github.com/mholt/caddy/pull/1289
I’ve added support for both gzip (.gz) and brotli (.br) compressed files.
This is great – I’m amazed @wendigo implemented it so quickly. I asked for this feature in June: Gzip performance; precompressed content
The brotli support will be nice too – brotli compression is very hard on CPU and memory compared to gzip, so having the server do it on the fly is a bad idea.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.