Hitesh Misro Hitesh Misro - 1 year ago 126
Javascript Question

How to prevent deobfuscating JavaScript code

Is there a way to prevent de-obfuscating JavaScript code which has already been obfuscated.

Obfuscated JS:


Answer Source

No, there is no way to prevent deobfuscating, but you could probably minify it aggressively before obfuscating it, just to render it as complex as possible.

In any case, the client will be able to see the source, and with the right amount of motivation, there's nothing that can't be read and understood.

If you wish to protect your code, execute it only server-side.

Having said that, you can prevent (or at least limit) theft by using the appropriate license and/or copyright on your code. This of course will not prevent anyone from stealing it, but gives you a legal recourse in case they try to make money off your hard work.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download