Javascript library: to obfuscate or not to obfuscate – that is the question [closed]

If they can decode it, they deserve to have the code (they’ll most likely find out they could have written better code themselves – they just didn’t have the business sense to put all the [plain vanilla] components in that particular order).

So really, you’re trying to solve a business issue with technical measures.

Anybody worth his salt as a Javascript programmer should be able to recreate whatever you do pretty easily by just looking at the product itself, no code needed. It’s not like you’re inventing some new magical thing never seen before, you’re just putting pieces together in a new way, as you admit yourself. It’s just Javascript.

Even if you obfuscate the script, it’ll still run as-is, competitors could just take it and run with it. A few customizations shouldn’t be too hard even with obfuscated code.

In your niche business, you’ll probably notice pretty quickly if somebody “stole” your script. If that happens, it’s a legal issue. If your competitors want to be in the clear legally, they’ll have to rewrite the script from scratch anyway, which will automatically buy you some time.

If your competitors are not technically able to copy your product without outright stealing the code, it won’t make a difference whether the code is in the clear or obfuscated.

Leave a Comment