[Javascript] Disable left mouse click and drag on images
Triche Osborne
wdlists at triche-osborne.com
Fri Jul 21 06:43:31 CDT 2006
Alan Easton wrote:
> Hello People,
>
> Now I know the issues surrounding trying to stop people stealing images off your
> website, it basically cannot be done, you can make life awkward, but essentially
> it cannot be done.
>
> Well, I have a client who wants me to make it as difficult as possible for any
> visitor trying to save their images.
I'm of two minds about this. As a user, I find mouse-click disables
annoying so I usually turn off JS on sites that try to use it. I
couldn't care less about their images, but I do use my right-click menu
for opening links in tabs and/or windows and resent having it disabled.
OTOH, I have several professional photography clients, and I can't
blame them for wanting to protect their livelihood. They understand that
as long as the picture is on the screen, it's up for grabs, but neither
do they wish to hand people their photos on a silver platter.
My compromise is to use an image overlay: instead of disabling the
mouseclick, load the "protected" image as a DIV background with a 1px
transparent GIF stretched to fit exactly on top in the foreground. A
right-click gives you the GIF instead of the photo. Dragging and
dropping does the same.
Mind you, I don't do this for every image on the site, only for photo
enlargements. Those are easy to automate and the only images they're
concerned about anyway.
Triche Osborne
More information about the Javascript
mailing list