[Javascript] Disable left mouse click and drag on images

Paul Novitski paul at juniperwebcraft.com
Fri Jul 21 11:58:28 CDT 2006


At 01:58 AM 7/21/2006, Alan Easton wrote:
>Well, I have a client who wants me to make it as difficult as 
>possible for any visitor trying to save their images.


I realize you're merely asking about JavaScript techniques, but I 
can't resist the urge to comment more generally.

If your client is really naive about web technology, you can probably 
write some code that will make them feel safer.  I understand why it 
often feels necessary to do this in order to placate client fears, 
even when you know perfectly well it's tissue-paper armor.

However, if you allow your client to feel safe and then someone 
scrapes their work off their site, their disappointment might well 
express as anger toward you for leaving loopholes in that tissue 
armor.  Some clients sue if they feel they've been misled and ripped 
off.  You might want to consider asking your client to sign a letter 
stating that they understand that the image-saving blocks you're 
adding to their site will not prevent a sophisticated user from 
scraping the images.

The click-blocking techniques you're contemplating will discourage 
only the most naive computer users.  I imagine these are not the 
people your client really has to worry about.  Anyone serious about 
taking images from a web page can stroll around them.  It's like 
adding a reinforced door to a room without walls.

As you know, if I can see an image on the screen I can save it as a 
screenshot; if an image appears on a web page then it's already been 
downloaded to my cache; JavaScript is easy to turn off; the Firefox 
web developer tool bar gives me access to all images on the page, as 
well as to the JavaScript-generated page source; and so on.

My recommendation is that your client watermark the images on their 
site -- which both displays a notice of ownership and effectively 
ruins the photos for unauthorized re-use -- and then ENCOURAGE people 
to save them, send them to friends, etc., in order to increase 
awareness of their work as much as possible.

Good luck,
Paul 




More information about the Javascript mailing list