Ads 468x60px

Pages

Sunday, August 26, 2007

Disable right-click to prvent copying of photos

(If you are only interested in how to disable right-click and you don't want to be bothered with all this arguments about why you should not do it, skip all this and go to the bottom of the post).

This has been requested many times, but in my opinion and also the opinions of many others in the know, disabling right-click to prevent visitors from copying your photo is a very bad idea. To me, it is an exercise in futility. If you still want to do it, I will outline how I did it for this blog Right-click have been disabled for this blog. Note that in that post which contains a photo, you can't right-click on the photo.

Before I show how to disable right-click, try clicking on the photo in Right-click have been disabled for this blog. You will be taken to a page with only the photo. Confirm that you can right-click on the image, select "Save image as" and copy the photo into your computer.

If clicking on the photo does not work, you can always click VIEW > SOURCE and look for the HTML used to display the photo. Below in a scroll box is the portion of the source code for that post. There will be two URLs there, one highlighted in red, and one highlighted in green. To see the green one, you will have to scroll down the box:

<div class='post-body'>
<p>There have been numerous requests on a post to disable right-click because it is easy to copy photos by right-clicking on it and selecting "Save image as". Some bloggers just cannot stand the idea of their photo being copied. So this blog is to demonstrate that it is not difficult and is entirely possible. Try right-clicking on the photo below and see what happen:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiApJaQXyH6fJ7dOgx9ClVkMv1iEFNoybKNKE7uUzLhO1HjVLIf1_RwFJEWpH3B9DCyZaiyFp5ziM6TzHefYBwC1aa02OJdpci1ROKhNqpBYep7svHoHb_WoSuovTKurlTzHMt54CoTGiw/s1600-h/MoreCatsInTown+wit+copyright+notice.JPG"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiApJaQXyH6fJ7dOgx9ClVkMv1iEFNoybKNKE7uUzLhO1HjVLIf1_RwFJEWpH3B9DCyZaiyFp5ziM6TzHefYBwC1aa02OJdpci1ROKhNqpBYep7svHoHb_WoSuovTKurlTzHMt54CoTGiw/s400/MoreCatsInTown+wit+copyright+notice.JPG" border="0" alt="Photo with copyright notice. Right-click disabled"id="BLOGGER_PHOTO_ID_5103238216347446514" /></a><br /><br />It is better that you add a copyright notice to your photo using a simple free photo editor like <a href="http://blogger-tricks.blogspot.com/2006/10/using-irfanview-photo-editor-for.html" target="new">Irfanview</a>. More expensive photo editors like Adobe Photoshop can also embed digital watermarks in images which are not visible, but can be detected electronically in case you need to take legal action. But tell me, how many bloggers are prepared to go to court over copyright infringements?<br /><br />This impediment can also cannot deter a determined copycat. All he has to do is to click VIEW > PAGE SOURCE and look for the HTML used to display the photo. He can then go to that page and copy the photo from there. Another easy way is just to take a screenshot.<br /><br />Further, this can cause many inconveniences for your visitors. I am used to right-clicking on a link and choosing the page to open in a new tab with a browser like <a href="http://firefox-alert.blogspot.com/2006/09/what-is-firefox-and-why-you-should-be.html" target="new">FireFox</a> which has tabbed browsing. However, try right-clicking on the link above and see if you can do it?</p>
<div style='clear: both;'></div>
</div>
<div class='post-footer'>

<p class='post-footer-line post-footer-line-1'>
<span class='post-author'>

Posted by Peter Chen

</span>


You will be able to find the URL of the photo in the HTML. Just copy the URL and paste it into the address bar of a new tab with a browser like FireFox which has tabbed browsing. If you copy-paste the first URL (highlighted in red) into the address bar of the browser press ENTER and you will be taken to the page with the photo where you can right-click and copy the photo. If you copy-paste the second URL (highlighted in green) and press the ENTER key, you will get a "pop-up" to either open the image with a photo editor or a photo viewer, or save it into your computer.

Another simple way is just to take a screenshot by pressing PRINTSCREEN, open up a photo editor like Irfanview (click BACK button to get back to this page), paste the screenshot into the photo editor window, crop the section you want if necessary, and save.

Fashion Critic also left a comment stating you can also (my own addition: minimise the window so that the desktop is visible) and drag the picture into your desktop. I tested that at Right-click have been disabled for this blog and found that it worked. So I hope you are convinced that disabling the right-click will only inconvenient your visitors but wouldn't do much to help prevent those who want to copy your photos from doing so.

A better way is to add a copyright notice to your photo as described in Put a copyright notice into your photo. More expansive photo editor like More expensive photo editors like Adobe Photoshop can also embed digital watermarks in images which are not visible, but can be detected electronically in case you need to take legal action. But tell me, how many bloggers are prepared to go to court over copyright infringements? But you do have the option to report the copyright infringement by report it to relevant parties by emailing abuse@google.com, abuse@blogger.com, etc., but whether action will be taken will be completely up to them.

Disabling right-click will also cause great inconveniences to your visitors. I used FireFox browser with tabbed browsing and frequently right-click on a link and chose "open in new tab". I get very irritated when I can't do this. I have put two links at Right-click have been disabled for this blog. Try right-clicking on the links there and see what happens. I also often right-click on a link and select "copy link location" to copy the URL into clipboard, but I can't do that for the above blog.

If you cannot stand your photo being copied, don't upload them to the web is my motto.

Disabling right-click

OK, after all the talk about why you should not disable right-click, if you still want to do it, this is how I did it for Right-click have been disabled for this blog. Sign into Blogger to get to the Dashboard, click LAYOUT for the blog which you want to disable right-click. Click the TEMPLATE tab, followed by clicking on EDIT HTML sub-tab. This will take you to the template editor. Search for the tag

<body>

I then added the line oncontextmenu="return false;" into the <body> tag so that it becomes

<body oncontextmenu="return false;">

Review, and if you don't get any error messages, save the template.

Acknowledgement: This tip was adapted from Disable right-click on page.

0 comments:

Post a Comment