What is the best free JavaScript obfuscator that i

2019-06-20 00:04发布

问题:

I know this question has been asked many times, but here are my specific needs. The obfuscator needs to come in a form of a java library, so I can make an Ant task in order to automate the build process. IE7, 8, Firefox and Chrome must be able to interpret the resulting js very fast (original js file is pretty big - 18k lines of code). If none exist which satisfy these requirements I'm willing to consider a commercial solution.

回答1:

Some options:

  • YUI compressor. See Julien Lecomte's blog for example use from Ant.
  • LCA Soft provide a free Ant task interface to the Dojo Toolkit compressor.
  • Jawr - Ant task.

(I've not used Jawr or Dojo, so can't comment on which is best.)



回答2:

Google's closure-compiler is another alternative.



回答3:

There is a newer free option for Javascript Obfuscation - Roquson. They provide completely free Javascript Obfuscation with additional features like Variable renaming, Domain Locking and Expiration Date.

Check it out here: http://roquson.com



回答4:

I still believe that jsutility.pjoneil.net provides the best compression of any program available except for gzip. It's obfuscation support is avoids most of the problems with obfuscation. It also now support batch operations.