常见问题主题 - 如何保护我的JavaScript代码? [英] FAQ Topic - How do I protect my javascript code?

查看:61
本文介绍了常见问题主题 - 如何保护我的JavaScript代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

----------------------------------------------- ------------------------

常见问题解答主题 - 如何保护我的javascript代码?

------------------------------------------------- ----------------------


使用客户端Javascript,你不能像你的代码一样分发
源代码形式的
,易于阅读。使用JScript,有一个

脚本编码器(参见MSDN),但这只不过是混淆。

禁用鼠标右键也无法保护

您的脚本在Web浏览器中。


您的代码可能受版权法保护。请参阅:

http:// www.wipo.int/about-ip/en/copyright.html

http://webdesign.about.com/msubcopyright.htm

===

这样的发布会自动发送一天一次。他们的b
目标是回答重复的问题,并将内容提供给社区进行持续评估/改进。完整的

comp.lang.javascript常见问题解答位于 http:/ /www.jibbering.com/faq/

FAQ工作人员是一群志愿者。

-----------------------------------------------------------------------
FAQ Topic - How do I protect my javascript code?
-----------------------------------------------------------------------

With clientside Javascript you can''t as your code is distributed
in source form and is easily readable. With JScript, there is the
Script Encoder (see MSDN), but this is nothing more than obfuscation.
Disabling the right mouse button also does nothing to protect
your script in a Web browser.

Your code is likely protected under copyright laws. See:

http://www.wipo.int/about-ip/en/copyright.html

http://webdesign.about.com/msubcopyright.htm
===
Postings such as this are automatically sent once a day. Their
goal is to answer repeated questions, and to offer the content to
the community for continuous evaluation/improvement. The complete
comp.lang.javascript FAQ is at http://www.jibbering.com/faq/.
The FAQ workers are a group of volunteers.

推荐答案



FAQ server写道:

FAQ server wrote:

---------------- -------------------------------------------------- -----

常见问题解答主题 - 如何保护我的javascript代码?

------------------ -------------------------------------------------- ---


使用客户端Javascript,您不能像源代码一样分发代码

,并且易于阅读。使用JScript,有一个

脚本编码器(参见MSDN),但这只不过是混淆。
-----------------------------------------------------------------------
FAQ Topic - How do I protect my javascript code?
-----------------------------------------------------------------------

With clientside Javascript you can''t as your code is distributed
in source form and is easily readable. With JScript, there is the
Script Encoder (see MSDN), but this is nothing more than obfuscation.



混淆不是那么糟糕。好的混淆器真的阻碍了专业人士的反向工程,并且几乎不可能为javascript的新手提供


问题是值得保护的代码是罕见的。


除非你想混淆弱代码以免羞辱

你自己:)

Obfuscation is not so bad. Good obfuscator really hampers the reverse
engineering for the professionals and makes it practically impossible
for the javascript''s newbies.
The problem is that the code worthy of the protection is a rarity.

Unless you want to obfuscate the weak code in order to not disgrace
yourself :)


marss在2007年2月6日凌晨3:45发表以下内容:
marss said the following on 2/6/2007 3:45 AM:

FAQ server写道:
FAQ server wrote:

> ------------------------------- ----------------------------------------
常见问题主题 - 我该怎么做保护我的javascript代码?
----------------------------------------- ------------------------------

使用客户端Javascript,你不能像你的代码那样以源代码形式分发,易于阅读。使用JScript,有一个
脚本编码器(参见MSDN),但这只不过是混淆。
>-----------------------------------------------------------------------
FAQ Topic - How do I protect my javascript code?
-----------------------------------------------------------------------

With clientside Javascript you can''t as your code is distributed
in source form and is easily readable. With JScript, there is the
Script Encoder (see MSDN), but this is nothing more than obfuscation.



混淆不是那么糟糕。


Obfuscation is not so bad.



混淆JS代码是完全浪费时间。

Obfuscation of JS code is a total waste of time.


好​​的混淆器真的阻碍了逆向工程专业人士
Good obfuscator really hampers the reverse engineering for the professionals



嗯?你认为将你的变量命名为不同会使得它变得更加困难。

" professional"而不是让他们独自一人吗?

Huh? You think naming your variables different makes it any harder on a
"professional" than leaving them alone does?


并且让javascript的新手几乎不可能。
and makes it practically impossible for the javascript''s newbies.



复制混淆代码,按原样使用,谁在乎它。没有新手

确实如此。

Copy the obfuscated code, use it as is, who cares about it. No newbie
does, thats for sure.


问题是值得保护的代码是罕见的。

除非你想混淆弱代码以免羞辱

你自己:)
The problem is that the code worthy of the protection is a rarity.
Unless you want to obfuscate the weak code in order to not disgrace
yourself :)



这是99%的混淆在我看来,代码的用途。


-

兰迪

机会有利于预备心灵

comp.lang.javascript常见问题 - http://jibbering.com/faq/index。 html

Javascript最佳实践 - http:// www.JavascriptToolbox.com/bestpractices/


2月5日下午4:00,FAQ服务器 < javascr ... @ dotinternet.bewrote:
On Feb 5, 4:00 pm, "FAQ server" <javascr...@dotinternet.bewrote:

----------------------- ------------------------------------------------ <无线电通信/>
常见问题解答主题 - 如何保护我的javascript代码?

------------------------- ----------------------------------------------


使用客户端Javascript,你不能像你的代码一样以源代码形式分发

并且易于阅读。使用JScript,有一个

脚本编码器(参见MSDN),但这只不过是混淆。

禁用鼠标右键也无法保护

您的脚本在Web浏览器中。


您的代码可能受版权法保护。请参阅:

http:// www.wipo.int/about-ip/en/copyright.html

http://webdesign.about.com/msubcopyright.htm

===

等帖子这是每天自动发送一次。他们的b
目标是回答重复的问题,并将内容提供给社区进行持续评估/改进。完整的

comp.lang.javascript常见问题解答是http://www.jibbering.com/faq/。

FAQ工作人员是一群志愿者。
-----------------------------------------------------------------------
FAQ Topic - How do I protect my javascript code?
-----------------------------------------------------------------------

With clientside Javascript you can''t as your code is distributed
in source form and is easily readable. With JScript, there is the
Script Encoder (see MSDN), but this is nothing more than obfuscation.
Disabling the right mouse button also does nothing to protect
your script in a Web browser.

Your code is likely protected under copyright laws. See:

http://www.wipo.int/about-ip/en/copyright.html

http://webdesign.about.com/msubcopyright.htm

===
Postings such as this are automatically sent once a day. Their
goal is to answer repeated questions, and to offer the content to
the community for continuous evaluation/improvement. The complete
comp.lang.javascript FAQ is athttp://www.jibbering.com/faq/.
The FAQ workers are a group of volunteers.



无法在浏览器中安全地保护Javascript。什么是

可能妨碍那些试图访问你的

代码的人的努力。在具有竞争优势的情况下,一家公司可能希望以最低延迟了解另一家竞争公司的方式。

与服务器推荐人检查的混淆可能妨碍
/>
了解竞争公司的时间。 Server Referrer检查

跟踪从哪里调用javascript。此服务器

引荐来源检查可以禁止从所有权域之外的服务器调用脚本

。这将使一个人调用脚本直接在浏览器中查看更加困难



同样,这不是保护,而是一种使脚本被盗的方法

比较麻烦。

Securely protecting Javascript in the browser is not possible. What is
possible is hampering the efforts of those attempting to access your
code. In the case of competitive advantage, one company may want to at
least delay the understanding of another competing company.
Obfuscation in cobmination with Server Referrer Checks can hamper the
time to understanding for a competing company. Server Referrer Checks
track from where calls to the javascript are made. This Server
Referrer Check can then disallow calls to the script from a server
outside of the domain of ownership. This will make it more difficult
for a person to call the script for viewing directly in the browser.
Again, this is not protection but a method for making script theft
more cumbersome.


这篇关于常见问题主题 - 如何保护我的JavaScript代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆