如何禁用或模仿我的MVC Web应用程序视图页面源? [英] How to make disable or ambigious my MVC web application view page source?

查看:107
本文介绍了如何禁用或模仿我的MVC Web应用程序视图页面源?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果有人浏览我的应用程序,他将能够看到我的页面查看源代码。我想这样做,就像我每次去facebook页面并按cntrl + u然后它显示加密代码或ambigious代码如何使它像那样在我的mvc应用程序中有任何建议吗?



我尝试过:



i已经尝试了一些javascript代码

if anyone browse my application he will able to see my page view source code.i want to do this like whenever i go to facebook page and press cntrl+u then it shows encrypted code or ambigious code how to make it like that in my mvc application any sugguetion?

What I have tried:

i have tried some javascript code

推荐答案

坦率地说你不能。但是有一些解决方法。



你可以在这里找到答案:



http://www.htmlgoodies.com/beyond /article.php/3875651/Web-Developer-Class-How-to-Hide-your-Source-Code.htm [ ^ ]



:)
Frankly speaking you can't. But there are some workaround.

You can find your answer here :

http://www.htmlgoodies.com/beyond/article.php/3875651/Web-Developer-Class-How-to-Hide-your-Source-Code.htm[^]

:)


Facebook只是使用javascript \ ajjax和某种模板系统构建其元素。生成的html仍然可以通过浏览器的开发工具看到(F12然后探索DOM)。您无法隐藏或保护html设置到浏览器。
Facebook just constructs its elements using javascript\ajax and some kind of templating system. The resulting html is still visible via the browser's dev tools (F12 then explore the DOM). You can't hide or secure html set to the browser.


这篇关于如何禁用或模仿我的MVC Web应用程序视图页面源?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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