Feels like the 90s: disabling right mouse button with JS

June 2, 2008 at 2:27 PMAndre Loker

It's Monday again and I feel like ranting. I can't believe that there are still web sites out there that try to "protect" their precious (?) content by trying to disable the right mouse button with JavaScript. Never seen it? Those pages hook up the mouse down or mouse up event with JavaScript. When you use the right mouse button to bring up the context menu on those pages (e.g. to copy&paste text, save images, view the source code etc.) instead an alert box pops up telling you smart things like "Please don't steal our content" or "If you are interested in our web site please contact our web master". Those protection mechanisms are remains of the late 90s when people discovered that JavaScript was sooo cool.

So here's to you, all you self-designated web masters:

  • First of all, everything the user of your web site sees has been downloaded to his/her computer anyway and can most likely be found in a cache somewhere on the hard disk
  • Disabling the right mouse button does not prevent anything that could not be done otherwise in the browser
    • Most keyboards have a context menu key
    • The same functions are most likely available as normal menu commands...
    • ... and by keyboard shortcut
  • One can easily disable JavaScript in the browser
  • And finally, probably your content isn't worth ripping anyway

Therefore, this kind of protection is no protection whatsoever. It is only

  • plain stupid
  • annoying people who want to copy information like links or e-mail addresses that really would be useful to copy
  • preventing users from taking your site seriously and coming back

So please, please, dear web masters: stop doing stupid things to your web site and its visitors. Or stop making web sites at all :-)

And now: back to work

Posted in: Other

Tags: , ,