Guides 11791 Published by

Xmodulo posted a quick tutorial about compressing CSS and JavaScript from the command line



For web designers, publishers and developers, one cannot stress enough the importance of keeping web pages or web applications as lightweight as possible. There are various design strategies and client/server-side techniques that can be exploited to achieve this goal.

One relatively simple and straightforward technique is "code minification". This is the process of eliminating unnecessary characters (e.g., white space, new lines, comments, optional delimeters) from source code, thereby "compressing" the size of source code at the cost of human readability. CSS or JavaScript code is commonly minified to reduce the amount of user-transferred bytes from a server.
  How to compress and minify CSS and JavaScript from the command line