Myth - You can hide the source code of an HTML page

December 2016




Myth


You can hide the source code of an HTML page.

Reality


FALSE.

Explanations


To view a web page (HTML), the browser must - at a time when another - have the HTML code.
There is always way to recover it.
  • The most common solutions to prevent access to the source are:
  • The prohibition of right-click and save it (which is easily bypassed in Firefox by unchecking the corresponding JavaScript in the configuration)
  • The use of multiple frames or iframes to hide the real URLs of pages (the screen "Page Info" in Firefox will show the related URLs).
  • Encryption of the page (including a bit of Javascript, which decrypts the page). Is easily bypassed by using the inspector Firefox code that accesses the HTML code after execution.

Notes


Thanks to Sebsauvage for this tip

Related :

This document entitled « Myth - You can hide the source code of an HTML page » from CCM (ccm.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.