You may have seen many sites that don't allow you to select/highlight text or images, ever wondered how they do it? Read this to know the trick.
Did you know that you can disable the copy and paste function on your website? Of course you did, that's why you're here, to see how it's done. You will be happy to know that it's too easy, just few easy steps, will write a article on full content copy protection soon.
In this post I will discuss the first thing that you must do to make your site content secure and that is to disable content highlighting or you can say content selection, content means both text and images. Only thing that you need to do is to add simple JavaScript anywhere on your webpage, blogger users can add it to HTML of their template just before the </head> tag or you can add this to a HTML gadjet.
JavaScript Code:
<script type="text/JavaScript">
//courtesy of www.ywfyouthvoice.com
function killCopy(e){
return false
}
function reEnable(){
return true
}
document.onselectstart=new Function ("return false")
if (window.sidebar){
document.onmousedown=killCopy
document.onclick=reEnable
}
</script>
In case if I have already applied this to my site and you're not able to copy the script then copy from here.
Will this make my content completely copy proof?
No, nothing can make your content 100% secure! I'll soon write a post on this topic, stay connected to our social media accounts for update.
Can a user bypass this JavaScript protection?
Yes, very easily. Since it is JavaScript, it doesn't work if the visitor has JavaScript disabled or has a browser that doesn't support JavaScript. That isn't very many users, but anyone with some experience would know a way around this trick. It will stop most new users though, and at least make it harder for everyone else. That may be all the discouragement they need to move on to easier pickings.
For any queries you can comment below in the comments section.