3 ms·
"Gzipping alone gives you about 70% savings and minification alone cuts script sizes with more than half. Both combined (minifying then gzipping) can make your
by ssttoo 11y ago
"Gzipping alone gives you about 70% savings and minification alone cuts script sizes with more than half. Both combined (minifying then gzipping) can make your scripts 85% leaner."
http://www.bookofspeed.com/chapter4.html http://www.bookofspeed.com/chapter4.html
- gruez 11y agoso really, minification only gets you 15% more size reduction.
- mc808 11y agoTechnically ~21% more reduction (e.g. saving 15k on top of 70k), but I suppose specific files probably deviate more than that anyway.
- ssttoo 11y agoyeah, possibly. This is old reasearch [1] with oldish minifiers (e.g. no UglifyJS) and only one script - jQuery from 5 years ago. However I don't expect large discrepancies if the reseasrch is duplicated with new modifiers and larger sample. What would be more interesting is to see the results of the different minifications. E.g. how much you get from simply removing comments and whitespace? How much if you also rename variables? There might be diminishing returns (and increased security risks) if you go further than those two simple and "safe" improvements [1] http://www.phpied.com/reducing-tpayload/ http://www.phpied.com/reducing-tpayload/