开发者

Can can I prevent someone from seeing my JavaScripts? [duplicate]

开发者 https://www.devze.com 2023-03-29 19:26 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate: How to prevent your JavaScript code from being stolen, copied, and viewed?
This question already has answers here: Closed 11 years ago.

Possible Duplicate:

How to prevent your JavaScript code from being stolen, copied, and viewed?

I'm aware its almost impossible to do something like that because JS is client side. However I'm sure some counter measures can be taken to prevent less experienced users from viewing the code. (something more effective than disabling right clicking)

I know there are measures that can be taken like this app . If you try viewing the script it blocks you someho开发者_运维知识库w. How can I set up a block like this (or perhaps better) for myself?

I just want to prevent leechers :\


The best you can do is compress and obfuscate your Javascript using YUICompressor or similar. This will at least make it hard to read.

0

精彩评论

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