Hitesh Misro Hitesh Misro - 4 months ago 42
HTML Question

How to prevent deobfuscating the JavaScript

Is there a way to prevent De-obfuscating my JavaScript code which was already been obfuscated.

Obfuscated JS:



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.