简体   繁体   English

如何在源代码中隐藏部分 html/js?

[英]How can I hide part of html/js in my source code?

Im afraid that people who come to my website could steel parts or the whole page.恐怕访问我网站的人可能会钢铁部分或整个页面。 How can i hide my source code or do something that people cant copy my work.我如何隐藏我的源代码或做一些人们无法复制我的工作的事情。

I know how to unable rightclick on my page, but i dont want to use this option.我知道如何无法右键单击我的页面,但我不想使用此选项。 i think visitors could think that my site is suspicious.我认为访问者可能认为我的网站是可疑的。

Help really appreciated and thanks for your time.非常感谢帮助并感谢您的时间。

The only sure fire way to protect your proprietary code is to keep as much of the logic as possible on your server, serving up what's needed using services such as REST.保护您的专有代码的唯一可靠方法是在您的服务器上保留尽可能多的逻辑,使用 REST 等服务提供所需的内容。

If it needs to be javascript on your website, there is only things to deter people from copying, that is making it less readable.如果它需要在您的网站上使用 javascript,那么只有阻止人们复制的东西才能使其可读性降低。 Using obfuscation tools and/or minifying your code.使用混淆工具和/或缩小代码。

You could minify your code so that it is not easily readable.您可以缩小代码,使其不易阅读。 http://jscompress.com/ http://jscompress.com/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM