Can view the source that will be disabled by the website?

Is it possible to create a web page that does not allow the source of the website to be displayed?

+4
source share
6 answers

No, you cannot hide the displayed HTML text on your web server.

How HTML is generated is a separate form of actual HTML that is sent from the server.

That is how the Internet and the global network were developed. If you use a server-side web application to generate your HTML code, then your business analyst / process / code is hidden provided that people do not have access to view the actual script file on your server.

If you want to configure one of the open source browsers, such as Firefox or Chrome, you can disable the "view source" functionality. This might be a good option for some intranet or internal business applications. XUL and Firefox are one of the ways our company can control end-user access. The only real security with which you must protect your source is on the server side, since network / protocol monitors can still pull on HTML when it moves across the network.

+1
source

No.

+11
source

From encrypt-html.com :

Almost all browsers provide a convenient way to view the source code of an open page. We regularly receive emails using the same question - how to disable source viewing.

It is impossible to enable or disable the html file built-in browser functions in most cases. It is not possible to remove the view-source command from the browser menu or to make it inoperative. But if the source is encrypted, what the user sees is just a lot of junk characters - not your source code. Thus, the source viewing command is practically disabled for each encrypted file.

+3
source

You can use plugin-based content, such as a java applet, Flash, etc., to somewhat β€œhide” the real content. Of course, since in the end it will be displayed on the screen, there is nothing that would prevent a specific user from redesigning your page.

+1
source

Here is an example site with a "view source" that is disabled in any browser: http://www.transelectrica.ro/StareSistem/protocoale/starea_sistemului.php Question: HOW DOES IT IT?

+1
source

I use a block method that disables the right click, but can still view the source on chrome using label labels in the address bar view-source:example.com

disable right click

 <script type='text/javascript'> function disableSelection(target){ if (typeof target.onselectstart!="undefined") //IE route target.onselectstart=function(){return false} else if (typeof target.style.MozUserSelect!="undefined") //Firefox route target.style.MozUserSelect="none" else //All other route (ie: Opera) target.onmousedown=function(){return false} target.style.cursor = "default" } </script> <body oncontextmenu='return false;'> <script type='text/javascript'> disableSelection(document.body); 
0
source

Source: https://habr.com/ru/post/1339319/


All Articles