Search code examples
javascriptminifyyui-compressoruglifyjsuglifyjs2

Which is the best javascript minifier UglifyJS or YUI compressor?


Please provide me which is fast and best compressor for Javascript. I have shortlisted these two for my application. Please tell me if you know another best compressor. Thanks in advance.


Solution

  • Question does not contain criteria for 'Best' :) If you ask me about simple - here is one: JS Miinifyer (http://jscompress.com/)

    • This is simple - copy paste your JS and get the output.
    • This checks syntax - it will not compress if there are syntax errors (at least some level of checking I am not sure if it checks details.)
    • You can upload JS files also instead of just copy paste.

    We used this for our productions deployments to do: 1. Compression. 2. Uglify JS