News for hackers. Stuff that matters.
Re:The smallest JavaScript libraries on the internet by wolfgke on Tuesday February 02, 2016 @10:48AM (#11020139)
Then 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)?
Re:The smallest JavaScript libraries on the internet by hartator on Tuesday February 02, 2016 @11:03AM (#11020236)
Stress on the client CPU + proxy caching is harder + broken support on some old IE
Re:The smallest JavaScript libraries on the internet by wolfgke on Tuesday February 02, 2016 @12:35PM (#11020906)
* 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?

Re:The smallest JavaScript libraries on the internet by hartator on Tuesday February 02, 2016 @01:40PM (#11021410)
> 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, 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-importa... It's doable but it's not trivial.

Re:The smallest JavaScript libraries on the internet by sbierwagen on Tuesday February 02, 2016 @11:39AM (#11020481)
CDNs charge per gigabyte. They make more money from larger files.
Re:The smallest JavaScript libraries on the internet by stbrumme on Tuesday February 02, 2016 @11:48AM (#11020539)
That's true for commercial CDNs. However, these Javascript libraries are hosted on free (!) CDNs, such as those kindly provided by Google, Microsoft, etc.