I’ll be quite to the point, is there any way to make Javascript a bit more concealed than it usually is or is Javascript always out and open if you look in the source code ?
This is about hiding proprietary algorithms that would dispense a service that does not exist yet (to my knowledge) on the market and is not really straightforward. I know that patenting is possible but let’s leave this out of the question.
5
Well you can “obfuscate” the code by removing all recognizable names that are not essential to the working of the code. (And minification is a good approximation to obfuscation.)
However, the fact remains that Javascript must be delivered (to the user’s browser) as source code that is ultimately compilable and executable by the browser. That means that someone who controls the browser will always be able to reverse engineer any “secrets” embedded in the code … and that includes secret algorithms.
(Incidentally, this applies to ALL methods of delivering algorithms. If you don’t control the execution platform, any mechanism for protecting or hiding a secret algorithm can be broken … given sufficient time and motivation.)
The solution is to not embed the algorithms. Keep them server side and have the browser make a call to the server to run them.
Alternatively, use a legal solution: require all users to sign a legally enforceable agreement that has “teeth” … and enforce it vigorously! (WARNING: this won’t make you popular with your users …)
2