4 ms·
Probably dumb question, but I always ask myself if it's changing size significantly to gzip (or brotli) a minified file instead of the original, as space and CR
by JeanMarcS 9y ago
Probably dumb question, but I always ask myself if it's changing size significantly to gzip (or brotli) a minified file instead of the original, as space and CR will be the most present character and so will be very well compressed.
On small files, the difference will be of course significant, but in big files ?
- Cthulhu_ 9y agoBig files the difference is also significant; minification removes and rewrites large chunks in the source code, which also compress to a smaller size. The dictionary for example contains a lot less data. See https://mathiasbynens.be/demo/jquery-size https://mathiasbynens.be/demo/jquery-size for an example of a library, compressed / minified / zopflied (?), and a comparison in file size. The most recent version in there (3.0.0-alpha-1) is 75 kb "just gzipped", 29KB gzipped + minified. Just minified is 84KB, so gzipping the minified file only shaves off an additional 9 KB compared to just minifying.