[thelist] disabling web text copy & paste

Lee Kowalkowski lee.kowalkowski at googlemail.com
Thu Oct 22 16:18:19 CDT 2009

> What is the HTML (JavaScript) code that prevents web browsers from copy & paste on text? You cannot highlight text and paste it, for example, to quote it in a blog post.

Worthless.  I hate it, I was on a site where they wanted me to enter
my email address twice, and they went out of their way to prevent me
from copy / pasting it from one field to the next, presumably to
reduce errors.  Charming!  Whose bright idea was it to prevent users
from pasting it from their address books?  Get a life!  Woah, back on

> I rarely see it done. It seems super protective in an anti-web way. But some sites may need this security measure to avoid people stealing their content in special situations, which I sympathize with.

I can't think of a single way to do it which would be easy to maintain
yet impossible to work around.

What's the point!? "Oh we know the bad guys can get our content, we
can't afford to stop them, but we'll do our best to stop the good
guys".  The 'good guys' are small fry compared to how much content a
bot writer can harvest.

> But why Snopes?
> http://www.snopes.com/

They're paranoid?  They forgot CTRL-A, CTRL-C though.  Or just switch
off JS which isn't difficult in most browsers, and you can select away
until your heart is content.

The script they're using is embedded in the page (view-source / CTRL-U
in most browsers).

Make a favelet to switch it off -
javascript:document.onselectstart=disableselect=reEnable;void 0;


More information about the thelist mailing list