On Friday, 31 May 2013 at 17:12:11 UTC, Andrei Alexandrescu wrote:
Hello,
I've been looking through the logs and it looks like the top
files in bytes transferred yesterday (even with the deluge of
downloads) were a number of Javascript, HTML, and CSS files.
There are programs to reduce the size of such files called
"minifiers". Should we use some? If so, what would the experts
recommend? We'd need ideally some command line utility that we
can deploy easily and integrate with the build process.
Alternatively, an online service could fit the bill, too.
Thanks for your insights,
Andrei
I recommend YUI Compressor. http://yui.github.io/yuicompressor/ I
use it for compressing JavaScript and CSS at my job, and it works
very well. (It's also part of a Maven build script at my job,
which is also cool.) If you use it, I recommend --nomunge
--preserve-semi --disable-optimizations so it doesn't do any
JavaScript fiddling beyond just minification.