|
Home » Other Tips » Graphic & Image Tips » Right Click Image Protection Right Click Protection with JavascriptThis is a fairly popular method of trying to protect your images from people downloading and printing. I say "try" because it's not 100%, but nothing is. Personally, I don't use this method because I find it detracts from the user experience which I feel is more important than trying to protect the images. Plus, I use the right-click menu quite a bit while browsing and find it annoying when it's blocked. The body tag <body onContextMenu="alert('Images are copyrighted'); return false;"> Just change the text Images are copyrighted to whatever message you want. For those that want to understand why this does what it does rather than simply dropping it in the alert() command is what actually pops up the box and the return false is what keeps the menu from popping up. Does it always work? Ultimately, this is a deterrent that will stop casual users but won't stop people determined to get your images. |
