开发者

How to secure the Javascript Code? [duplicate]

This question already has answers here: Closed 12 years ago.

Possible Duplicate:

how to prevent your javascripts being stolen,copied, and viewed ?

What is the best way to secure the javascript code & make it hard to understand it and for sure steal it... I know that its impossible to secure it 100% since its client side and all the code the 开发者_运维百科client can see it.. But I need to make it as hard as possible...


All you can do is minify and obfuscate it.

Here is a free obfuscator, there are several around.


First, obfuscate it - change functions/variables names to meaningless names. Then pack it using the packer.


100% securing of JS code is impossible. Whichever popular packer you use, JSBeautifier is usually able to reconstruct a humanly-readable source from it. Personally, I only use Google Closure Compiler which is the best minifier/optimizer currently available.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜