从站点下载后阻止运行js代码 [英] Prevent running js code after download from the site

查看:83
本文介绍了从站点下载后阻止运行js代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用Html和JS编写的游戏。我希望用户只能在我的网站上播放它并阻止他下载代码并在本地计算机中使用它。我看到我无法阻止下载代码,但可以对其进行加密。但它对我来说不够好,因为加密后的代码可以在下载后使用。下载我的代码后,您有更多建议如何防止使用我的游戏吗?



提前感谢

解决方案

< blockquote>不要浪费你的时间。使用今天为HTML5和JavaScript定义的标准和技术套件无法在浏览器上运行。



JavaScript和HTML5都在客户端浏览器上运行,这意味着浏览器已经下载它以使其正常工作。



您可以添加花哨的东西,如混淆器等,但后来也有可用的反混淆器。



如果您不希望最终用户看到并能够在客户端计算机上下载它,请不要将其构建为HTML5和JavaScript。期间!



但是,如果你正在开发一些超酷且令人敬畏的HTML5,JavaScript解决方案,它以前没有开发过,而且对你的业务来说真的很核心;如果有人复制,你可以获得版权并遵守法律诉讼。


I have a game which was writen in Html and JS. I want the user can play it only on my website and prevent him to download the code and use it in their local computer. I saw that I can't prevent downloading the code, but can encrypt it. But it dosen't good enough for me, because the encrypted code can work after downloading. Have you have more suggestions how to prevent using my game after downloading my code?

Thank in advance

解决方案

Don't waste your time. It's not possible with the today's set of standards and technologies defined for HTML5 and JavaScript to work on browsers.

Both JavaScript and HTML5 run on client browser which means that the browser is already downloading it to make it work.

You can add fancy things around like obfuscator etc. but then there are deobfuscators which are also available.

The thing is if you don't want the end user to see and be able to download it on client machine, don't build it HTML5 and JavaScript. Period!

However, if you are developing some super cool and awesome HTML5, JavaScript solution which has not been developed before and is really core to your business; you can get it copyrighted and follow a legal action if someone copies it.


这篇关于从站点下载后阻止运行js代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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