Why disabling right-click and Ctrl+U on website is bad idea
  John Mwaniki /   08 Sep 2021

Why disabling right-click and Ctrl+U on website is bad idea

In this article, I will explain why it is completely not a good idea to disable your website from being right-clicked or use of Ctrl+U shortcut.

Over time, I have come across a number of websites that disabled right-clicking on them. Most of them have as well disabled using the Ctrl+U shortcut, which is used to view the source code for that particular page.

Why do people disable webpage right-clicking?

Here are some of the reasons they do it:

To protect their images

Website owners, most of the time invest a lot in getting some high-quality images for displaying on their websites. They usually feel wasted when people download them for free and use them on their websites.

As a way of protecting the images, they disable right-clicking.

To protect website content

They also do it as a way to protect their content from being copied and used on other websites.

To hide their source code

It usually takes a lot of time and effort to write HTML, CSS, and Javascript code for a good-looking and well-functioning website.

Some web developers just lazily copy other peoples' website source code, make a few changes and publish them as their own.

As a way of protecting their website source code, some developers think it is wise to disable viewing of page source on their website.

Another reason they do is to try hiding the technology in which the website is built for some reasons. For instance, by checking the page source you can easily tell whether the website is hand-coded, built using a CMS(eg. WordPress), and/or a front-end framework.

Why it is not a good idea to disable right-clicking

It is annoying

Disabling right-clicking achieves nothing other than annoying your website visitors. It just makes the use of your website difficult and less user-friendly.

Just the other day I visited a certain website. As I was reading through the content I found a link that I thought its page content would be useful. Since I was not done with the current page, I decided to right-click on it and select the option to open it in another tab.

Surprisingly, instead of getting the right-click menu, I got an alert that "right-clicking is not allowed". I just concluded that maybe the links within the content have been made to open in a new tab by default and so I just clicked on it. It took me away from the page.

I am sure I am not the only person who has experienced this on that website.

While it is still possible to open a link in a new tab by clicking on it while holding the Ctrl key or to open it in a new window by clicking on it while holding the Shift key, most people don't know how to do that, or they just prefer to right-click menu.

It is insulting

The vast majority of people coming to your website just want you to provide them with quality, interesting and useful content. Most of them have no intention of stealing your content or your source code.

By trying to protect your website from the minority group, you end up insulting the majority who use the right-click menu for genuine and legitimate reasons.

Disabling right-clicking is just like telling your web visitors that you don't trust them with your content. How do you expect them to trust you in return?

It is unprofessional

If you visit an eCommerce website, where you want to buy a product. You get to a category with several products and decide to open each of them in a new tab so that you can compare them and make an informed decision. On trying to do this, you find an alert that you are not allowed to copy the page content or to download its images. Would you still buy from that site?

Disabling right-click is one of the highest levels of lack of professionalism to users.

It is pointless

As I stated earlier, the only thing disabling right-click achieves is in annoying your website users.

It does not protect your source code, images, or content. Disabling right-click and Ctrl+U will get users curious, wanting to know what it is exactly that you want to hide.

This will end up being counter-productive to you as your images and source code will attract the attention of the tech survey.

It is very easy to access the source code of any website in most of the major browsers. Below are some of the ways you can do it:

1. Adding "view-source:" before the page URL in the address bar

You can view the source code of any web page by adding view-source: to its URL in the web browser address bar. For instance for a page with URL "https://example.com/about-us", just write this: "view-source:https://example.com/about-us" in the address bar then hit enter.

2. Disabling JavaScript in the browser

All the major browsers such as Google Chrome, Firefox, Microsoft Edge, Opera, etc have the "disable javascript" feature.

Since developers use JavaScript code to disable the right-click context menu, you can disable that code by disabling javascript in your browser. Once you have disabled javascript in your browser, just return to the page and reload it. On right-clicking again you will be able to see the menu.

Disabling javascript has a drawback in that it disables other important features on that web page and in other websites and will limit your usage and experiences. Once you finish doing whatever made you turn javascript off, re-enable it again.

3. Using Ctrl+Shift+I or F12

When on any web page, whether the right-click has been disabled or not, you can still access its source code and content by pressing the keys Ctrl+Shift+I or by pressing the F12 key depending on your operating system. Then navigating to the Inspector tab.

4. Downloading the web page

You can as well press the keys Ctrl+S and you will be able to save the web page and its files in your device's local storage. You can then open the page with an editor such as notepad and copy its content.

Note: If you do not want your content taken, you should not post it on the web.

Conclusion

There is a high likelihood that you have been to, or will be to a website whose pages have been disabled from right-clicking. Those who disable it, do it for a reason. Is it really worth it?

In this article, I have explained in detail why disabling right-click, Ctrl+U, and other similar shortcuts is a bad idea and how it does more harm than good to your website. You definitely shouldn't do it.