开发者

How to protect javascript function? [duplicate]

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

Possible Dupl开发者_如何转开发icate:

How can I obfuscate JavaScript?

Is there any way to protect my js file or javascript function from user to view?


You could minify/obfuscate it but the function would still be visible to the user.


Nope but you can always obfuscate. just look up online for javascript obfuscator. It makes code harder to read but it'll still be decodable.

If you need to hide code may I suggets something serverside such as php, aspx etc..


Like Darin sayd, you can obfuscate the code. But if you want execute a js file on a browser, the user can get the source code. There is no way to avoid this.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜