1
Thanks

A few words of thanks would be greatly appreciated.

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

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

1
Thanks

A few words of thanks would be greatly appreciated.

Ask a question
CCM is a leading international tech website. Our content is written in collaboration with IT experts, under the direction of Jean-François Pillou, founder of CCM.net. CCM reaches more than 50 million unique visitors per month and is available in 11 languages.
This document, titled « Myth - You can hide the source code of an HTML page », is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (ccm.net).