How to Disable Right Click- Secure Your Contents

Bloggers and many websites disable the right-click option to keep their contents and images safe. This prevents other users from copying the text or reuse the images. You can disable the right-click on your browser with the help of several codes. However, browsers like Opera Mini do not allow us to disable the right-click button. Moreover, disabling the button can cause severe accessibility issues and often render us frustrated. After knowing all these, if you still choose to disable it, here is How to Disable Right Click easy guide.

How to Disable Right Click- Why Is It Important?

Finally, this method is serving the users the protection which most likely shouldn’t be considered as protection. When someone is trying to copy your content, they will receive the “Right-Click on this site is disabled. Hold Ctrl key and click on the link to open in new tab” message. Yet somehow they manage to steal your contents; below are some examples of how a user can steal your texts and use them to somewhere else.

  1. For this to work without a glitch, the JavaScript must be enabled on the browser
  2. They view the source code and find the image or the text which they want to copy in the source code and then drag the image from the browser and drop it to their preferred location
  3. If the user wants to copy a text, they may highlight it and then copy the text and paste it somewhere else.

Source Code

If you want to protect your posts, we suggest you try this method. This method will only display a Copyrighted notice once a user clicks on the image you are looking to protect. You have to add the code in-between the HTML <head> </head> tags.

<script language=”JavaScript” Type=”text/javascript”>


function popupMsg(theMsg) {





This code is to be added into the header while you are adding an image and at the same time, you can use the below code:

<IMG SRC=”issues/pictures/cexample.gif” onMouseDown=”popupMsg(‘This image is Copyrighted — Computer Hope 2007’)”>

How to Disable Right Click- Internet Explorer

You can use the command we have given below into HTML <body> tag, this will disable the right-click button and keyboard menu button in Internet Explorer:

oncontextmenu=”return false” onselectstart=”return false” ondragstart=”return false”

Or you can also use this command:

<BODY oncontextmenu=”return false” onselectstart=”return false” ondragstart=”return false”>

You can add the below code between the HTML <head> </head> tags:


var isNS = (navigator.appName == “Netscape”) ? 1 : 0;

if(navigator.appName == “Netscape”) document.captureEvents(Event.MOUSEDOWN||Event.MOUSEUP);

function mischandler(){

return false;


function mousehandler(e){

var myevent = (isNS) ? e : event;

var eventbutton = (isNS) ? myevent.which : myevent.button;

if((eventbutton==2)||(eventbutton==3)) return false;


document.oncontextmenu = mischandler;

document.onmousedown = mousehandler;

document.onmouseup = mousehandler;


How to Disable Right Click- Google Chrome

Try this: go to Setting then Under Hood Tab and from there, Content Settings. You can also enter  chrome://settings/content in the search bar and select Do not allow any site to run JavaScript.

In these ways, you can protect your contents and images. Still, if you need any help, we are available to reply in the comment box below. You can also read: Desktop Window Manager, RAVBg64.exe

Leave a Reply

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