obfuscation - How can I obfuscate (protect) JavaScript? -


i want make javascript application that's not open source, , wish learn how can obfuscate js code? possible?

obfuscation:

try yui compressor. it's popular tool, built, enhanced , maintained yahoo ui team.

you may use:

private string data:

keeping string values private different concern, , obfuscation won't of benefit. of course, packaging source garbled, minified mess, have light version of security through obscurity. of time, it's user viewing source, , string values on client intended use, sort of private string value isn't necessary.

if had value never wanted user see, have couple of options. first, kind of encryption, decrypted @ page load. 1 of secure options, lot of work may unnecessary. base64 encode string values, , easier.. wanted string values easily decode them. encryption way prevent accessing data, , people find more security need.

sidenote:

obfuscation in javascript has been known cause bugs. obfuscators getting little better it, many outfits decide see enough benefit minifying , gzipping, , added savings of obfuscation isn't worth trouble. if you're trying protect source, maybe you'll decide it's worth while, make code harder read. jsmin alternative.


Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -