JavaScript Obfuscation and Minification
How well can modern JavaScript obfuscation/minification tools protect my code from reverse engineering? Also, what obfuscation platforms are the best for preventing this? It seems it would be rather easy to make a program to deobfuscate code and make the process rather pointless.
If this is not something that is perfect, are there any solutions that rel开发者_JAVA百科y on code being served remotely?
All you can do with obfuscation is make a determined hacker work more in order to borrow your code or understand how to use your code. You cannot prevent it if they are determined.
There are lots of programs out there that will de-minify code to make it readable or debuggable again. Removing all the meaningful variable names and obviously code comments does make it more work for someone to understand the code, but does not prevent a determined hacker from doing so.
Algorithms or trade secrets that must remain protected should not be in client-side javascript, but rather should be performed on a server with results put directly into the page or put into the page via ajax calls.
精彩评论