0

I am trying to make it as difficult for users to copy content from my web page. I have looked at existing threads e.g. how to restrict user to copy web content

In this and a number of other threads people have reiterated that once content is displayed in the browser a person determined to copy can usually find a way around it and can take pictures or even make notes. While I appreciate that there may not be a completely foolproof solution for this, all I am trying to achieve is to make this as difficult as possible for people to copy content from my website.

With that background I wanted to explore a suggestion that is there in many of the other threads that I have looked at. It suggests use of the user-select property to disable selection of the content from the page e.g. Prevent selection in HTML or How to disable selection of text on a web page

However, with this approach it is possible for someone to disable the CSS property from the Dev tools window. Once the property is disabled it is possible for users to select the content from the web page. So my specific question is "Is there any way in which I can prevent users from changing the user-select css property from chrome Dev tools"?

Thanks

Community
  • 1
  • 1
Anurag
  • 84
  • 3
  • 17

1 Answers1

-3

Try to add a on change event to that element and whenever the element's property is changed it will add your customised style attribute to it again and again.

Jai
  • 139
  • 1
  • 2
  • 9
  • The onchange event doesn't trigger when properties change. Even if it did, it would be trivial to disable. – JJJ Jul 19 '16 at 09:01
  • OKay, but can't we prevent key events, say preventing (ctrl+c) and disabling context menu – Jai Jul 19 '16 at 09:40
  • No. The user is in full control of their computer and browser. – JJJ Jul 19 '16 at 09:45
  • Hope this will prevent user from copying text $( "body" ).on('keydown', function(event) { if (event.ctrlKey && event.which == '67'){//copy function event.preventDefault(); event.stopPropagation(); } }); – Jai Jul 19 '16 at 09:53
  • It will prevent only casual copying, but anyone with basic understanding of web development just opens the browser console and removes that restriction by typing `$('body').off('keydown')`. – JJJ Jul 19 '16 at 09:57
  • Thanks @Jai for your suggestion. Will try to use. As mentioned I am looking to make this as difficult as possible.... – Anurag Jul 19 '16 at 10:24