Another technique to deter image theft is to use JavaScript. The following code will prevent surfers from right-clicking and saving your images. In order for this technique to work, the surfer must have JavaScript enabled on their browser. This is not a fail-safe method, determined thieves will be able to get around any image protection. Place the following code between your <head> </head> tags. Replace "All images are protected by Copyright. Do not use without permission." with whatever message you want to display when a surfer tries to right-click and save on one of your images.
<script language="JavaScript"><!--
//script to protect images from theft
function click()
{if (event.button==2)
{
alert('All images are protected by Copyright. Do not use without permission.')
}
}document.onmousedown=click
// --></script> |
Here's a demo of how this works. Try right-clicking on the image below.

All of these methods, described in this article, can be used either singularly or combined as multiple layers of image protection.
Article by Jeremy Baker
|