user1548054
user1548054

Reputation: 21

Javascript obfuscator / minifier for projects using JQuery

what is the best JS minifier / obfuscator to use for projects that use JQuery? I'm currently using the closure compiler and I've also tried YUI but they never seem to minify and optimise my function names or variable names, effectively all they do is remove whitespace and comments whereas I'm trying to make my code as small as possible and hide as much as possible.

Any ideas?

Thanks

Upvotes: 0

Views: 2836

Answers (2)

Muthu Kumaran
Muthu Kumaran

Reputation: 17910

Closure is a good minifier. Also there are other minifiers worth to check,

Packer: http://dean.edwards.name/packer/

JSMin: http://crockford.com/javascript/jsmin

Upvotes: 0

Sirko
Sirko

Reputation: 74036

Take a look at the closure compiler again. It has 3 execution levels

  1. Whitespace only You used this setting. Just redundant whitespaces are removed.
  2. Simple In addition to removing whitespaces this renames your variables and function names to shorten the overall scripts, but leave your code intact.
  3. Advanced This further improves the simple setting by possible restructuring your code. So, e.g., some functions may get inlined etc.

Upvotes: 1

Related Questions