Sunday, September 12, 2010

Prevent 'edit source' option in browser for web-page

For a change, this is a tech post rather than my usual 'spur of the moment' thoughts.

A friend who does some web-page development writes some very complex scripts for some of his pages. He has already seen duplicates ( yep, imitation is the highest possible compliment for an artiste ). Anyway, we were discussing some options available to protect his source. A mere copyright notice is no help.

To my knowledge, any webpage travelling in the internet is subject to being viewed at the point of receipt, or at the point of the recipient firewall/proxy/whatever in a text-editor. There is no way to stop someone from viewing the source; the best a person may do is to run a script to hide the menu-bar. This option too will fail if the user simply disables script execution.

My suggestion is to use flash pages, or even change the page format from HTML to some format which does not lend itself to reading in text-pad or such. Say, embed the HTML into a spread-sheet, and then send the spread-sheet to the recipient to be opened on receipt.

Thoughts, people?