qwik: enable brotli compression for larger files
See original GitHub issueIs your feature request related to a problem?
having a look at the build logs and network tab we have at least one bigger file (~16kb gzipped) which is served with gzip
compression to our clients and could be even better compressed using brotli (br
). in our file it would be a reduction of ~2kb.
Describe the solution you’d like
file sizes above a configurable threshold should be compressed using br
instead of gzip
Describe alternatives you’ve considered
theres no alternative 😄
Additional context
No response
Issue Analytics
- State:
- Created a year ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Brotli Compression: A Fast Alternative to GZIP Compression
Brotli has a better compression ratio (i.e. it produces smaller compressed files) across every level of compression. While GZIP does beat Brotli ......
Read more >How to Enable Brotli Compression for Your Site - YouTube
Ready to look into Brotli compression and see how to enable it on your own site? 💪 The answers are here 💥 👉...
Read more >Introducing Support for Brotli Compression - .NET Blog
Summary. Brotli is a relatively new compression algorithm. It's quite beneficial for web clients, with decompression performance comparable to ...
Read more >'You can't use Brotli for dynamic content'
I enabled this on a static asset management tool a while ago and it took several times longer to generate compressed files than...
Read more >Brotli and Static Compression
In this short article, you'll get to learn about setting up your site to statically compress files for optimal compression performance, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
it makes sense, but i would look into: https://github.com/vbenjs/vite-plugin-compression
Since this output is controlled by vite! if this plugin does not work, then maybe there is something we can fix in our side 😃
thanks again 🙏
of corse you would go with a vite plugin 😄 i’ve mentioned our current plain react/webpack setup not a solution for qwik.
btw: netlify does brotli compression automatically w/o any preconfig: https://www.netlify.com/blog/2020/05/20/gain-instant-performance-boosts-as-brotli-comes-to-netlify-edge/
for express we would still need to use your plugin to get the
br
,gz
files and then serve them using theexpress-static-gzip
lib. gave it a spin quickly and the only “ugly” thing is, that we need to compressbr
andgz
sequentially:build output
if you think it is something for your node/express defaults let me know and i’ll have a look at it when the new adapter handling is shipped. otherwise thanks for all your answers and patience 🙏