4 ms·
As much as I would like your statement to be true: jquery-2.0.3.js 236K jquery-2.0.3.js.gz 70K jquery-2.0.3.min.js 82K jquery-2.0.
by byroot 13y ago
As much as I would like your statement to be true:
jquery-2.0.3.js 236K
jquery-2.0.3.js.gz 70K
jquery-2.0.3.min.js 82K
jquery-2.0.3.min.js.gz 29K
Minification pay off a lot even with compression.
- michaelmior 13y agoTo be fair, this doesn't show a performance improvement, it shows a file size reduction. Of course you can assume one leads to the other, but it doesn't fully prove the point.
- byroot 13y agotime curl http://code.jquery.com/jquery-2.0.3.js > /dev/null real 0m0.433s time curl http://code.jquery.com/jquery-2.0.3.min.js > /dev/null real 0m0.210s Is it proved now ? Edit: Off course I didn't ran these requests only once.
- bct 13y agoThe obvious next question is "can't you achieve the same thing with gzip": time curl http://code.jquery.com/jquery-2.0.3.js > /dev/null 236k bytes real 0m0.432s time curl http://code.jquery.com/jquery-2.0.3.min.js > /dev/null 83612 bytes real 0m0.323s time curl http://code.jquery.com/jquery-2.0.3.js --compressed > /dev/null 87509 bytes real 0m0.273s time curl http://code.jquery.com/jquery-2.0.3.min.js --compressed > /dev/null 34066 bytes real 0m0.215s I think that people should be more skeptical of the complexity introduced by things like minification, but the advantages are pretty clear, even with compression.
- michaelmior 13y agoThis still doesn't show that actual site performance is improved. Also, gzip is not enabled on that server, so I think it's a less realistic scenario. I'm certainly being pedantic, but I've run into similar surprises before.