You are developing a website or a blog. Your requirement is that the readers should not be able to select all or highlight the contents of your site so they cannot copy and reproduct your contents.
There are many methods to do that. People often use JavaScript. But JavaScript can make your site load slowly. And readers can disable the JavaScript from their browser then they can copy every thing they want.So how to disable select all, highlight text to protect your contents from being copied?
In this post, I will give you a simple but effective method to protect your contents. Your readers can read but they cannot copy. That’s great. Here is the code:
<div onclick="onselectstart=return false;" style="-moz-user-select: none;" id="content">
<div id="content">
Put your content here
</div></div>Thats it.And now your contents are protected from being copied.
No comments:
Post a Comment