如何向用户隐藏html源? [英] How to hide html sourse from user?

查看:62
本文介绍了如何向用户隐藏html源?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

hi all.,

any on know How to hide html sourse from user?

推荐答案

您不能.如果呈现了页面,则他们可以看到导致呈现的html.您可以创建Flash页面或Silverlight,但即使那样,仍需要一些HTML才能使这些技术起作用.
You can''t. If the page is rendered, they can see the html that causes the render. You could create a flash page or silverlight, but even then, some HTML is required to allow those technologies to work.


这是不可能的,因为任何Web浏览器都必须能够解密html.为了显示它,您不能使用不能仅仅编写自己的程序进行解码的加密.如果可以查看网络上的某些内容,则无论使用哪种方式,您都可以获取源代码.与Flash和Silverlight相似,可以拦截AJAX,如果您努力尝试,则可以破解其中的任何内容,也可以仅拦截内容消息.不可能允许用户通过常规的Web技术查看某些内容并阻止他们获取源代码.如果您真的很绝望,则可以编写一个页面,其中只有一个使用SSL的Flash对象下载内容然后显示该内容,但是在这种情况下为什么要使用Web,因为很多人将无法使用Web使用您的网站; P基本上,您要的是不可能的.



P.S.如果可能的话,我会将其标记为恶意.; P
It is impossible as any web browser has to be able to decrypt the html to display it, you can''t use an encryption that you couldn''t just write your own program to decode. If something on the web can be viewed, you can get the source, regardless . AJAX can be intercepted, similarly with Flash and Silverlight, if you try hard enough, you can crack anything in them or just intercept the content messages. It is impossible to allow a user to view something through conventional web technologies and stop them getting the source. If you are really desperate you could write a page that just has a flash object that uses SSL to download content and then display it, but then why are you using the web at all in that case because lots of people won''t be able to use your site ;P Basically, what you''re asking for, is impossible.



P.S. I would mark this as a rant if it were possible... ;P


我不认为这是可能的,但是,是的,您可以对其进行加密.
I don''t think its possible but, yes you can encrypt it.


这篇关于如何向用户隐藏html源?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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