Protect the contents of a web page
If you have a website with some valuable and unique content, you probably have thought about protecting your images or text from copying. The first thing that comes to mind is to block the right click.

This can be effective for novice users, but we know it will always be possible to retrieve the address of the image file and thus by looking at the source code for your page advanced users can copy it.
---
Most existing solutions are of using a JavaScript, which is easily circumvented by disabling it in the browser.
Anti Right Click JavaScript
To block right click, just code your web page to display a dialog box when someone use the right click mouse button. There are many scripts on the web that can do that job.
Another solution is to return a value instead of the menu. It is very simple to implement in JavaScript. Simply insert this attribute / value in the body tag:
<span style="color: #008000;"><</span> <span style="color: #0000ff;">body</span> <span style="color: #008000;">oncontextmenu =</span> <span style="color: #ff0000;">"return stop();"</span><span style="color: #008000;"> ></span>
Then, report the stop function which will return false instead of the menu that appears when right clicking. Insert this on your web page between the head tags:
<span style="color: #008000;">< </span>script <span style="color: #0000ff;">type</span> = <span style="color: #ff0000;">"text/javascript"</span> <span style="color: #008000;">> </span><span style="color: #333333;"><!-- </span><span style="color: #333333;">function stop() </span><span style="color: #333333;">{ </span><span style="color: #333333;">return false; </span><span style="color: #333333;">} </span><span style="color: #333333;">// --> </span><span style="color: #008000;">< /</span> script <span style="color: #008000;">></span>
To summarize
- Some techniques exist to make it more difficult to copy the contents of a site.
- It is always possible to retrieve a file via the source code.
- Block right click to prevent direct copying.