如何防止javascript代码被盗? [英] How can I prevent javascript code theft?

查看:444
本文介绍了如何防止javascript代码被盗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

实际上我正在开发一个Chrome扩展程序和一个jQuery插件来上传它并在Codecanyon上出售。当我检查页面的源代码并单击资源选项卡时,javascript文件看起来是空的。 Codecanyon是如何做到的?我想在我自己的网站上也有防盗文件,但我不知道怎么做。我知道php和javascript并没有方法可以做到这一点,因为浏览器会下载文件来执行它。

Actually I'm developing a Chrome extension and a jQuery plugin to upload it and sell it on Codecanyon. When I "Inspect source" of the page and I click on the "Resources" tab, the javascript file looks empty. How does Codecanyon do that? I want to have file theft prevention in my own website too, but I don't know how to do it. I know php and javascript and there's no method to do it, because the browser downloads the file to execute it.

你可以看到示例这里

推荐答案

你可以只是试图降低其可读性(通过迷你和混淆),但代码仍然是转移的,可以进行逆向工程。

You can only try to make it less readable (through minifiaction and obfuscation), but the code is still tranferred and it can be reverse engineered.

下载示例中的实际代码使用jquery.js文件。

The actual code in your example is downloaded with the jquery.js file.

这篇关于如何防止javascript代码被盗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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