Ticker

6/recent/ticker-posts

Header Ads Widget

Shared Hosting with Namecheap. Free .Website domain & WhoisGuard

How to disable right click on your website



There are some websites which do not want their data to be copied or they just want to disable a right click on their website.

Whatever the reason may be... Lets see how we can do this by just using a simple code.

Use the below code on your website :

 <body oncontextmenu="return false;">   

Place this code after <head> tag on your website. This code will work on majority website.

However for security reasons, i would suggest you to take the backup of the original file and then use this code, so that if anything goes wrong, you still have the actual source code.

Always remember, whenever you do a tweak, you should keep a habit of taking backups of the existing files. This will help you in saving your time and efforts for the customization and/or tweaks already done.


Post a Comment

0 Comments