Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is obsfucation worthwhile?

Does it make sense to obsfucate Javascript? The only clear benefits I can see are to hide code (albeit non-proprietary in nature since it's client-side) from prying eyes and as a minimizer since often Javascript obsfucators do minimization as well.

like image 252
Keith Adler Avatar asked Mar 09 '10 19:03

Keith Adler


2 Answers

I do not think that JavaScript obfuscation is worth the effort for concealment purposes in most general scenarios. However, minification is worth-it, for many reasons, which as you mentioned, has the minor side-effect of obfuscating code as well.

like image 74
Daniel Vassallo Avatar answered Sep 21 '22 20:09

Daniel Vassallo


Well, if its not some cutting edge javascript code that should not be easily copied and reproduced, and the script is not too big in bytes, i would not do the bother. Its a bit hassle to do the obfuscating each time you need a deploy, and the benefit is small.

That is, the script is not too big , and code does not to be protected.

(even obfuscation does not really protect your code, just make it abit harder to understand)

like image 26
Vidar Vestnes Avatar answered Sep 17 '22 20:09

Vidar Vestnes