How can I disable the right-click on my website? I want to avoid people getting text or photos out of my website.
Right-click (on Apple machines ctrl+click) is used for many things among which is the great “Save as...”. People could use it to get your images from your website which usually is something you want to avoid especially if you’re a photographer. Of course disabling the right-click on your website keeps only the less computer-savvy of your visitors from getting your photos out of it. Actually not even those since you still get the photos off the site by drag&drop if right-click is disabled.
Adding another code in addition to the one disabling right-click people won’t be able to select or drag&drop the image either.
Nevertheless select all (via cmd(Apple)+A) then copy (via cmd(Apple)+C) once you did select all will work. Also the more computer savvy among you and your visitors will know that there are other ways to get something out of a website. Even if selecting and right-clicking is disabled.
So basically the message is:
People who want something will get it one way or another.
Try it out on this page! Try selecting the text above and drag&drop the image below...