View Full Version : Right-Click disable code not working.

04-10-2012, 10:20 PM
1) Script Title: Disable right mouse click script

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex9/noright.htm

3) Describe problem: A friend has a website that has been having difficulties with images getting stolen. So, I did a bit of research and came up with your code to disable right click. However, I went to check it out after she'd done the insertion and I can still right click. (I'm using Firefox 11.0.) I right clicked, got the message about the right click being disabled, and as long as I OK, it stays disabled. If you right click a second time it pulls up another dialog box with a check box with the message of "Prevent this page from creating additional dialogs." If I clicked on the box and THEN OK, I was able to right click and do anything as if there was no block at all.

The URL for the page in question is: http://ke-appaloosas.com/

I apologize if this is confusing. I haven't worked on websites in about 4 years, and only then using Dreamweaver and knowing enough HTML to smooth out errors and know enough when to ask someone else. LOL I am not working on the site, the owner is, but I'm just offering suggestions and doing some grunt work for her, like posting this thread.

04-11-2012, 12:36 AM
Firefox can also be configured to not allow that script to interfere with right clicking in the first place. Other browsers can do similar things. If the image is on the web, it can be gotten. It's already on the users computer in their cache. Unless caching is disabled, they can find it there. If nothing else works, the user can do a print screen and copy the image from that.

It's essentially like text. How can I protect what I just typed? If I want you and others to see it, there's no way other than the law. At least with images there are some other options.

The bottom line is that no javascript can protect images. There's copyright law for that. Another avenue is watermarking, and/or using lower resolution versions, and/or using detail views (cropped versions) of the original full high res image.

A lot depends upon what images are being protected in the first place and if there's any real reason to protect them.

Consider copyright law. If you can prove that you're suffering a harm by someone taking your images, then you can recover damages. But if you're not getting anything out of exclusive rights to your material, that may be hard to prove.

If a photographer is selling prints, low res watermarked versions would be appropriate for display on the web. If they're technical drawings, a cropped detail might be a better idea.

Just what is the situation? There's no 'one size fits all' solution to this question.

04-11-2012, 01:20 AM
John-- I'm a print graphic designer, and work with copyrights on a daily basis. I informed the site owner of pretty much all you said about the graphic. The idea is to make it harder for someone to get her photos, not impossible. She's working on the watermarks.

I am trying to figure out why I'm getting the option to turn off the right click disable at all.

04-11-2012, 03:06 AM
You're getting the option to disable it because websites should not be allowed to control what a user can do in their browser. It's annoying, and it's a security risk.

If your client isn't convinced by your explanations of copyright, watermarking and low-res images, you might explain this:

1. "no-right-click" does not stop image theft. If you know what you're doing (and most image thieves do), it is trivial to circumvent. (For starters, just turn javascript off.) More conversation on the subject here (http://www.dynamicdrive.com/forums/showthread.php?t=48916); but basically: you can not make image theft "difficult enough" to prevent it.

2. On the other hand, it is very easy to make it too difficult and frustrating for your honest, everyday users to visit your site. Saving an image is not the only thing you right-click to do. These honest users are far less likely to understand what is going on when they suddenly can't right-click - you just broke their internets! Do you really think they'll come back to your site after that?