22 ms·
> “Surprisingly, most Content Delivery Networks (CDNs) give you a quite bad level of GZIP compression.” I think CDNs have a good reason for choosing their pref
by SimeVidas 11y ago
> “Surprisingly, most Content Delivery Networks (CDNs) give you a quite bad level of GZIP compression.”
I think CDNs have a good reason for choosing their preferred method of compression. Just the file size alone isn't the whole picture.
- stbrumme 11y agoI clearly understand they don't want to waste hours on compression. But why don't they even achieve the level of a simple gzip -6 (default level) ? Especially Microsoft's CDN is very bad in this category.
- wolfgke 11y agoThen explain to me, what reasons the CDN has not to choose the best available compression (at least for small files that are downloaded rather often)?
- hartator 11y agoStress on the client CPU + proxy caching is harder + broken support on some old IE
- wolfgke 11y ago* Stress on the client CPU Do you have any evidence that these smaller files stress the client CPU more (this is probably not an absurd statement, but I claim that one can only make serious discussions about this point if one has a computable (i.e. not only empirically measurable) metric that measures how much a client CPU is stressed by some file). * proxy caching is harder Could you explain me the reason for that?
- hartator 11y ago> Do you have any evidence that these smaller files stress the client CPU more (this is probably not an absurd statement, but I claim that one can only make serious discussions about this point if one has a computable (i.e. not only empirically measurable) metric that measures how much a client CPU is stressed by some file). http://tukaani.org/lzma/benchmarks.html http://tukaani.org/lzma/benchmarks.html, Actually I was wrong, Gzip decompression doesn't seem to be impacted at all by higher compression rate, it's even the reverse with small gain in decompression speed. Gzip compression is though - for a mere 3% to 5% gain in size, compression is taking 4x to 6x the time. > proxy caching is harder, could you explain me the reason for that? The tricky part is each filed can be compressed in different ways, the CDN might have to store different versions of the same file that can lead to a mismatch between the compression used and the actual compression of the file, a good post on the topic: https://www.maxcdn.com/blog/accept-encoding-its-vary-important/ https://www.maxcdn.com/blog/accept-encoding-its-vary-importa... It's doable but it's not trivial.
- sbierwagen 11y agoCDNs charge per gigabyte. They make more money from larger files.
- stbrumme 11y agoThat's true for commercial CDNs. However, these Javascript libraries are hosted on free (!) CDNs, such as those kindly provided by Google, Microsoft, etc.