How can I disable copying content from the app?

The requirement is to disable copying anything from the app to the clipboard. Is there a way to achieve this ?

If your goal is to stop the user from selecting any part of text or image so that he is not able to copy it, then you could try

.noselect {
  -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
     -khtml-user-select: none; /* Konqueror HTML */
       -moz-user-select: none; /* Firefox */
        -ms-user-select: none; /* Internet Explorer/Edge */
            user-select: none; /* Non-prefixed version, currently
                                  supported by Chrome and Opera */

adding this to your css file and using it as


as an attribute to your html element.
Also, please note that this solution only stops user from selecting and then copying the content. There are still dozens of other way user can copy the content, such as inspecting the element, viewing the page source, network monitoring for response in api. etc.
If your platform is android, then you can go a bit further and install privacy screen plugin. Just install it and it prevents user from screen capturing your app or showing your app screen in the app switcher.

1 Like