Log in

View Full Version : Disable right click?



Twilightrose917
05-13-2008, 01:22 PM
I am working on a website that will allow me to sell my sister's and my artwork, but I don't want anyone taking the images any time they want. Is there code that I can put in a page to disable the right click or just make it so people can't save images off my site?

hyk
05-13-2008, 01:35 PM
Hi there. i found 2 codes who you are looking for. But i suppose the second one is what you meant since you talk about images

http://www.dynamicdrive.com/dynamicindex9/noright.htm
http://www.dynamicdrive.com/dynamicindex9/noright2.htm

Hope i guide you in the right direction:D

Twilightrose917
05-13-2008, 01:56 PM
yeah thanks they helped a lot. I think I'll use both of them, actually... :)

sjm133
05-13-2008, 04:37 PM
But, don't forget. Once the image is displayed by the browser, the image is in the client temporary internet files folder for free use. Also, once you pop the javascript alert they know you have disabled the click with javascript. So a user only has to simply disable scripting in IE to do whatever they want. Then there's the "View Source" option so even if the righ-click is disabled users can see the image path and get the image directly from the server. Even if you find ways around all this there is always "Alt-Print Screen" and then paste in your favorite graphics program.
I've battled this many times in many ways, but there is no sure fire way around this.

You could always watermark the images. To me that's the most difficult thing to remove from an image.

Twilightrose917
05-13-2008, 06:09 PM
But, don't forget. Once the image is displayed by the browser, the image is in the client temporary internet files folder for free use. Also, once you pop the javascript alert they know you have disabled the click with javascript. So a user only has to simply disable scripting in IE to do whatever they want. Then there's the "View Source" option so even if the right-click is disabled users can see the image path and get the image directly from the server. Even if you find ways around all this there is always "Alt-Print Screen" and then paste in your favorite graphics program.
I've battled this many times in many ways, but there is no sure fire way around this.

You could always watermark the images. To me that's the most difficult thing to remove from an image.

um... I have NO idea what that 'client temporary internet files folder' thing is. Can you (or someone) explain please?

and on the subject of disabling javascript and looking at the source... I don't think that most people know how to understand javascript, and I also think that most don't know how to disable it. And even if someone found the source, it's highly unlikely that they would be able to understand it well enough to get what they want out of it.

Also - wouldn't the second link that hyk gave be a way to stop people from saving images? I guess I don't know for sure about that... But I do admit that there is no sure way to stop people from getting my images. I'm just trying to make sure that it isn't easy for them...

I have considered the watermark idea though. My mom ran it by me and I think it would be the best way to protect them. I'm still going to disable right-clicking, however.

thanks for the comments - you gave me a couple things to think about. :)

Master_script_maker
05-13-2008, 08:40 PM
instead of using th right click javascript, just put a transparent image on top of the image. When people right click save, they will only get the transparent image.

djr33
05-13-2008, 09:22 PM
If you put your images on the web, they can be stolen. It is absolutely impossible to stop someone, who has even just a bit of basic knowledge, from stealing ANY image on your site, no matter WHAT you do.

This has been discussed many times, so feel free to search the archives; there was a thread yesterday, etc.
I'm gonna close this now-- not that you did anything wrong, but, I promise, the answer is just that you will annoy users.

(The idea by master_script_maker isn't bad, but it will only go as far as stopping the thieves who don't know much, which certainly won't be all of 'em.)