Posted on June 9, 2008 in Web Design by Jiang YioNo Comments »

Websites that disable copying through the clipboard are annoying and their authors do not realize how impolite it is to interfere with functions that should be outside the control of a web page. It does keep a population of users from stealing information, but it also upsets legitimate users and is relatively easy to circumvent in many cases.

A copy-disabling technique I came across today involves the use of the oncopy event:

<div oncopy=”return(false);”>stuff you can’t copy</div>

While it is annoying, the limitations of the method are apparent. First, notice how we can just extract the information from the page source. Failing that, we can disable Javascript. For kicks, we might even whip out Firebug and remove that event handler altogether.

Not only do these techniques offer content publishers no protection whatsoever (think: if you send it to the client, the client must have access to it to display it), they also keep visitors from coming back. It’s like disabling right-click… only worse. Don’t do it.