How to disable Copy and Paste in your Website

Now continuing from my last blog, I am here to describe the method to “Disable copy and paste on any website”. This method also disable Copy and Paste by using shortcut key Ctrl+c and Ctrl+V. For this method all the steps are same as my previous post. But still I am writing all steps required for this action.

Step 1: Open the home page of your website in any text editor.

Step 2: Go to your  <head> tag area. You can find it on the beginning of the codes of that page. It is the best zone to write JavaScript.

Step 3: Type these codes in that area.

<script type=”text/JavaScript”>

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>

Step 4: Now save this file and upload it to your website by using control panel or FTP account which you like.

Step 5: Now go to your website and perform a copy and paste. You can’t see any selection on that page. Its 100% working method.

Note: This code is written only in your home page so it work on home page only. You have to write it in all pages of your website. The simple way is to add a header file in your website.


Leave a Reply

Your email address will not be published. Required fields are marked *