Reputation: 397
I've just installed Google Page Speed. Looks it minifies and concats css and js on the fly. So does it make any sense to do it in page code now when I have it?
Upvotes: 0
Views: 234
Reputation: 817
The JavaScript minification in PageSpeed is similar to the algortihm used by JSMin. JSMin is a filter which removes comments and unnecessary whitespace from JavaScript files. It does not however obfuscate or uglify your code (replace variable names with shorter ones).
So there is still a case for minifying by hand: For minifying CSS, you can try YUI Compressor and cssmin.js. For minifying JavaScript, try the Closure Compiler, the YUI Compressor (deprecated) or UglifyJS.
However, look at this link for a comparison between UglifyJS and JSMin. PS I'm not really buying his argument on build time vs. client download time. To me browser/client performance is paramount. Build time concerns comes a distant second. However, the article is worthwhile in terms of the comparison between the two libraries and for taking gzip compression into account.
Upvotes: 1