How do I disable right click on my web page?

You can do that with JavaScript by adding an event listener for the “contextmenu” event and calling the preventDefault() method:

document.addEventListener('contextmenu', event => event.preventDefault());

That being said: DON’T DO IT.

Why? Because it achieves nothing other than annoying users. Also many browsers have a security option to disallow disabling of the right click (context) menu anyway.

Not sure why you’d want to. If it’s out of some misplaced belief that you can protect your source code or images that way, think again: you can’t.


<!DOCTYPE html>
<script type='text/javascript' src=''></script>
<script type='text/javascript'>//<![CDATA[ 
$('img').bind('contextmenu', function(e){
return false;
    <img src=""/>

How to Enable Right-Clicking on Web Sites That Block It:

Though it’s less common these days, many sites still use JavaScript or an HTML attribute to disable right-clicking on their pages. It’s a practice we hope goes away, but in the meantime, it’s not too hard to get around those restrictions.


Many of these sites seem under the impression that disabling the context menu in your browser is a good way to keep you from stealing their content. But disabling the context menu in your browser also deprives you of a lot of other tools. While you can take the nuclear option and just disable JavaScript in your browser, that limits the functionality of a lot of sites that use JavaScript to deliver useful features. Instead, we’re going to show you how you can re-enable right-clicking for specific pages you’re viewing, and a couple of extensions that limit these sites’ ability to impose the restriction in the first place.

Enable Right-Clicking on Individual Sites with a Bit of Your Own JavaScript

This first method is probably the least intrusive. It’s just a bit of JavaScript that resets the context menu value for a page. When viewing a page with right-click disabled, you can just type or paste this code into your address bar and hit Enter. You don’t even have to reload the page. Right-clicking should be enabled immediately.


Even better, you can create a bookmarklet out of that code so it’s always just one click away. Select the code above and drag it to your browser’s toolbar (or wherever you store bookmarks). Rename it something that makes sense to you, but leave the code intact for the URL.

Enable Right-Clicking and Copying on All Sites with a Browser Extension


While the JavaScript bookmarklet works well for re-enabling right-click on individual sites, you may want a more comprehensive solution if you find yourself running afoul of this problem more frequently. That solution is a browser extension.

In Chrome, we recommend installing the RightToCopy extension. As its name suggests, it does more than just enable right-clicking. It also enables text selection and copying on sites that have disabled those functions, and even removes text that web sites inject into the text you copy (such as “Read More at…”).

Unfortunately, there is no directly comparable Firefox extension at this time. Of course, there are more comprehensive script blocking extensions available, such as NoScript (Firefox) and ScriptSafe (Chrome). Extensions like these block all scripts from running on any web pages unless you enable it. Both are worth looking into for a little added peace of mind, but note that they can be problematic on sites that use scripts for useful features.

And that’s it. Disabling right-clicking on web pages may be only an occasional problem, but it’s annoying when it happens. It’s also super easy to fix.



How to get around websites that block right-clicks:

If you’ve ever tried to right click on a website to copy or share content, you may have noticed it doesn’t work: Congratulations! You just ran into a site that blocks right-clicking and other methods of directly accessing content.

This can be very annoying, especially if all you want to do is share a funny quote, or post a link to content on your social feeds. However, there are ways of getting past this right-click blocking. If you’re willing to try out a few new tools, we’ll show you the best – and safest – ways to do it!

(Also, we hope we don’t have to say this, but please respect intellectual property, hard work, copyrights, and all that other important stuff when using these workarounds.)

Picking the right browser

Best Browsers Header

Because this right-click issue is primarily about managing JavaScript, the Internet browser you use makes a big difference when it comes to finding workarounds. The best browsers are Google’s Chrome and Firefox…which shouldn’t be a problem for most of you. Safari is a third option, since it offers very quick JavaScript disable options. Finally we have Microsoft Edge, which isn’t as flexible in its current state. To save yourself from more work than is worthwhile, pick one of the more adaptable browsers before taking a look at our options.

Option 1: Use plugins


When a website blocks right-clicks, they do it through JavaScript. While JavaScript may be falling out of favor in some corners of the Internet, it’s still very good at specific types of customization, such as preventing users from right clicking. However, because most JavaScript tends to run client side you retain a certain amount of control over it: If you want to disable the block, you’ll need a solution that can disable all or part of the JavaScript on a site.

The reason that Chrome and Firefox are such good picks here is that they have a very broad set of extensions and plugins that can customize your browsing experience. It’s no surprise that some enterprising developers have created plugins that deal with specific JavaScript issues, including the right-click block. These extensions are the best solution for this problem – they are very fast, only disable what they have to, and don’t require you to mess around with settings too much. We suggest downloading one, based on what browser you use:

Allow Copy (Chrome): Allow Copy is ideal if you want to do a lot of sharing or copying throughout the day and find frequent right-click blocking very intrusive. The extension puts a little button on your toolbar. Surf on over to a copy-protected website, turn this button on, and it will strip away those blocks. Once you are finished with all your clicking, turn the button back off, and resume your work. Note that this enables not only right-click options but also text copy and other features.

RightToClick (Firefox): RightToClick is a slightly more customizable add-on than Allow Copy. Like the Chrome solution, it puts a button on your toolbar that will disable copying and right-clicking and so on, whenever you want. However, it also includes configuration options so you can choose exactly what JavaScript features it will target. This makes it more adaptable and effective than other extensions, as long as you are willing to put a little effort in customization. Note: If RightToClick isn’t working for you, try out other add-ons such as SettingSanity or NoScript.

These extensions are the easiest solution, but they aren’t foolproof. They may not target the right JavaScript, and blocking websites may find ways to render them useless. Always remember to keep your extensions updated for the best results. If you run into a situation where they just won’t work, it’s time to make things a bit more manual…and move on to our second option.

Option 2: Turn off JavaScript entirely in settings

Most browsers allow you to dive into settings and find a choice to disable JavaScript entirely. This approach is more time-consuming: You’ll need to visit settings every time you find a site that blocks right-clicks, and then visit again to turn JavaScript back on. But for infrequent uses, this solution can be effective. Remember, however, that turning off all JavaScript can have other unintentional effects depending on the site – you may find some functions unavailable. Here’s how to make the command decision for three popular browsers:Chrome Javascript

  • Chrome: Start by heading to the menu button (the one with three bars in the upper right corner) and then choose Settings. In settings, look for the blue link to Advanced Settings and head there. You should see a list of headings – look for one that says Privacy. Right under this should be a couple of buttons, the left one reading “Content Settings.” Click this, and look for the JavaScript section. Here you will see an option that says, “Do not allow any site to run JavaScript.” Choose this.
  • Firefox: It used to be easy to turn JavaScript off in Firefox, but on newer versions of the browser this has been disabled (why, Mozilla?). However, you can still force a JavaScript disable command if you want to. Start by typing “about:config” into the address bar. Assure Mozilla that you know you may be voiding your warranties, and then in the new search bar that appears, type “enabled” and search for it. You should see the value of this preference set to “true.” Double-click and set it to “false” instead – and you’re done!
  • Safari: Safari makes this a snap. Head to the upper left of your screen and choose Safari in the OS X menu. Then click on Preferences. This will bring up a window that shows all of your major preference choices. Under Web content, you should see an option that says Enable JavaScript. Make sure this is not selected, then go about your business.

Option 3: Proxy Sites


Proxy sites essentially take a website and strip away all its security features so you can reach the content (among other things). Because you have to use third-party services this option often takes the longest, which is one reason it’s usually simpler to use a command or a plugin. However, for very frequent/global work a proxy site may be your best bet to disable right-click blocks and other JavaScript features. There are a lot of proxy sites out there, but the most popular is probably Hide My Ass. However, Hide My Ass recently went to a full pricing model, so it’s more suitable for professionals: For a free personal option we suggest something like Skull Proxy, which is relatively quick and painless, or the similar Hidester.

How to Bypass Right Click Block on Any Website

You might remember an experience where you tried to right-click on a web page but got a pop-up message saying that the “right-click functionality has been disabled”. Sometimes you may be trying to copy an image or view the source of a web page but when the right-click is disabled, these things would seem impossible. Bank websites and other sites that require a secure transaction such as a payment gateway are the ones to impose this kind of limited functionality on their pages. In this post, I will show you the ways by which you can easily bypass right-click block feature on any website.

In order to block the right-click activity, most websites make use of JavaScript which is one of the popular scripting languages used to enhance functionality, improve user experience and provide rich interactive features. In addition to this, it can also be used to strengthen the website’s security by adding some of the simple security features such as disabling right-click, protecting images, hiding or masking parts of a web page and so on.

How JavaScript Works?

Before you proceed to the next part which tells you how to disable the JavaScript functionality and bypass any of the restrictions imposed by it, it would be worthwhile for you to take up a minute to understand how JavaScript works.

JavaScript is a client side scripting language (in most cases), which means when loaded it runs from your own web browser. Most modern browsers including IE, Firefox, Chrome and others support JavaScript so that they can interpret the code and carry out actions that are defined in the script. In other words, it is your browser which is acting upon the instruction of JavaScript to carry out the defined actions such as blocking the right-click activity. So, disabling the JavaScript support on your browser can be a simple solution to bypass all the restrictions imposed by the website.

How to Disable the JavaScript?

Here is a step-by-step procedure to disable JavaScript on different browsers:

For Internet Explorer:

If you are using IE, just follow the steps below:

    1. From the menu bar, go to Tools -> Internet Options.
    2. In the “Internet Options” window, switch to Security tab and click on the button Custom level…

IE Security Settings

  1. From the Security Settings, look for the option Active scripting and select the Disable radio button as shown above and click on “OK”.
  2. You may even select the Prompt radio button, so that each time a page is loaded, you will have the option to either enable or disable the scripting.

For Google Chrome:

If you are using Chrome, you can disable the JavaScript by following the steps below:

    1. Click on the Chrome “menu” button (on the top right corner) and select Tools.
    2. From the “Settings” page, click on Show advanced settings…
    3. Now under Privacy, click on the button Content settings…

Chrome Content Settings

  1. Under the JavaScript, select the radio button which says “Do not allow any site to run JavaScript” and click on “Done”.

For Mozilla Firefox:

Steps to disable JavaScript on Firefox:

    1. From the menu bar, click on Tools -> Options.
    2. From the Options window, switch to Content tab, uncheck the option which says “Enable JavaScript” and click on “OK”.

Firefox Content Options

How to Bypass the Right Click Block?

In order to bypass the right-click block or any other restriction imposed by JavaScript, all you need to do is just disable it in the browser and refresh the same page, so that it now reloads without JavaScript functionality. You are now free to right-click on the page, view its source or even copy any of the images that you may want to. Don’t forget to re-enable the JavaScript once again when your job is over. Otherwise lack of JavaScript support may result in unusual rendering of web pages.



How to enable right click on websites that have disabled it

In one of our previous posts, we have seen how to save images to your PC, when right-click is disabled. Now let us take a look at how to enable right click on websites that have disabled it, and copy text from the web page.

While browsing, we often come across useful information in random websites, but when we want to note it down, our efforts go in vain when we see a window saying “Sorry, this functionality has been disabled by the administrator” because the right-click option has been disabled by the site administrator. If the information is a how-to guide or something then it could be a lifesaver for us at times. Clearly, jotting it down or paraphrasing it again is a laborious activity. One option would be save the entire web page for offline reading. But if you need to copy only parts of the text, then these options may make more sense.

How to enable right click on websites

Let us take a look at some of ways to re-enable right click on websites & copy from right click disabled websites or blogs, which have turned it off on their web pages, via browser settings or by using third-party tools.

A] Without Third Party tools

Essentially the code which disables this feature and displays the window when you try to right-click on a web page is written in JavaScript. But there are some ways using which we can bypass it.

1. Using a Code method

In this method, all you need to do is remember the below string, or right it down at some place safe:


From now on, whenever you come across a web page, in which the right-click option has been disabled, just copy the above code, paste it in the browser address bar and hit enter. That’s it!

You will now be able to access the right-click context menu options on the fly. But, the downside here is you need to use it every time in order to access the right-click menu.

enable right click on websites

2. Disabling JavaScript from Settings

You can disable JavaScript and prevent the script running which disables right-click feature.This post will show you how to disable JavaScript in Internet Explorer, Chrome, Firefox & Opera.

Once you have disabled JavaScript, come back to the web page and then reload it. Boom! You will be able to access the right click menu like a champ. But, the drawback with this method is that you are completely turning off the Javascript, which means it wouldn’t run any JavaScript codes at all, restricting the other functionalities of the web page. So, once are done copying, you need to re-enable JavaScript in your web browser again.

3. Other methods

If your intention is just to copy text from the web page then you can do it easily either by looking into the source code of the web page. Hit Ctrl+U and find the required text and then copy.

The other way is to save the web page to your computer, using Ctrl+S shortcut, double-click to open it and then copying the necessary text area.

B] Using Third Party Tools

If you aren’t that much into checking the internals of your browser, there are always other ways using which you can get over with this.

1. Using Web Proxy

Simply put, a web proxy is something which sits between you and the Internet and lets you browse websites anonymously by hiding your details such as IP address. You can go to a site which offers web proxy, such as or filterbypass, and enter the URL of the web page where right-click option has been disabled. Check the Remove Scripts option which prevent the site from running any scripts and go.


2. Using Browser Extensions

If you can’t find comfort in any of the above methods, you can always seek help from the web store. Just install the extension in the browser which does the job without giving you any headache. There are many extensions available for this purpose. You can check out RightToCopy for Chrome or Right To Click for Firefox.

NOTE: Always respect Copyrights. Many a times, websites disable the right click option, because of copyright issues as they do not want their content to be noted down. If the text you are handling with has copyright issues, you need to be careful while reproducing it. Nothing illegal has been suggested here – only workarounds using your own browser and third-party tool which are available on the official Google & Mozilla websites.

(Visited 45 times, 1 visits today)



Leave a Reply