Skip to main content
Inspiring
April 12, 2019
Answered

How make it so one cannot copy the text?

  • April 12, 2019
  • 3 replies
  • 824 views

I have a competitor site where the text cannot be copied. Seems very unusual. I would like to achieve this. Not a flash site, and this person is very SEO savvy. Any ideas how? The text can be copied if one goes to the code, but not from the regular web page.

Also on her page, the links don't have an underline when one scroll above them, only hand symbol which is nice.  Is that good or bad? How is that achieved. Thanks!

This topic has been closed for replies.
Correct answer BenPleysier

I am opposed to what your competitor is doing, but answering your question, add the following JavaScript to your page

document.body.oncopy = function() { return false; }
document
.body.oncut = function() { return false; }
document
.body.onpaste = function() { return false; }

alternatively

document.body.oncontextmenu = function() { return false; }

For the link add the following to your style sheet

a {

  text-decoration: none;

}

3 replies

Nancy OShea
Community Expert
Community Expert
April 12, 2019

Disabling right click is rude & annoying.  It removes access to advanced browser features that  many people rely on.  The golden rule in web design is "don't mess with people's browsers."

Nancy O'Shea— Product User & Community Expert
Jon Fritz
Community Expert
Community Expert
April 12, 2019

The only real way to keep someone from copying the content of your website is to not publish that content to your website.

That's the long and short of it.

If all you're doing is causing a slight hiccup in a bad actor's copying efforts, and simultaneously annoying every viewer that tries to otherwise interact with your text, what use is it?

BenPleysier
Community Expert
BenPleysierCommunity ExpertCorrect answer
Community Expert
April 12, 2019

I am opposed to what your competitor is doing, but answering your question, add the following JavaScript to your page

document.body.oncopy = function() { return false; }
document
.body.oncut = function() { return false; }
document
.body.onpaste = function() { return false; }

alternatively

document.body.oncontextmenu = function() { return false; }

For the link add the following to your style sheet

a {

  text-decoration: none;

}

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!