Pexsol Interactive

How to prevent users from copying data and images from your website?

Data entry is time consuming. You get your website up with awesome images and copy and latter find out that people are copying it. Since your website is public, you can’t really make people to stop copying but at least you can make it difficult for them! Here are a few suggestions:


Add CSS

Add the following styles to the div you need protected. This will prevent people from selecting the text and copying it within that div. You can add this to the body as well, but this will interfere with form elements like text boxes where a user might need to select:

.MyDivName {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}


Javascript Codes to disable right-click

Use any of the following codes. This will prevent users from right-clicking: