Mark E. Buckley

Hiding your source code

If you are designing a web site, you might wish to protect all those files you created. Normally, a visitor can simply right click and then view your source code. He or she could then appropriate your clever coding.

One step you could take is a little java script code. The code is triggered on a right mouse click. If the event is triggered then the visitor gets an alert message saying something about how the materials in the web site are copyrighted, etc.

One complexity of the script has to do with how mouse clicks are denoted on PC's versus apple machines.

So now I could provide the script ( which is available in any entry level Javascript text book.) However it does not work.

If a visitor goes to your site and is interested in looking at your source code, they will right click on your page. If a pop up appears all they have to do is open internet tools and change their security settings to high. If they refresh the page, the pop up will not work because the security setting is blocking that script.

There are other measures you can take to protect your artistic output, but this method does not work, except against the uninitiated.

Also I am not suggesting copying others code. While looking at code on the web is educational, you should strive to aggregate what you have learned into your own unique composition.