How to Disable Inspect Element


How to Disable Inspect Element Maybe some of us want to prevent others from checking the website for the purpose of viewing the source code, or the secret functions contained within the website. Of course every website owner wants to prevent others from duplicating websites through inspect element. And that's especially important when you spend a lot of time and hard work building your website.

In this post we disabled not only right click but all shortcuts that would allow someone to check your website. The inspection element will only be disabled on the page or post where the code is present. That's why we recommend that you implement the code in the body or somewhere that appears on all web pages.

Sometimes you want to disable inspection elements of your website to keep it safe. There are many ways to check a website's code or find words in the code. You can check the source code on a website or blog by right-clicking, pressing the f12 key, using ctrl+shift+i, using ctrl+f, etc. For that, see the following review so that you know how to lock html scripts.

Disabling Right Click on Website


So to disable the button or right click on the website, you can copy the below code and paste it in your website page. Note that it will only disable page code where you have used javascript code. Here is the code for how to remove the inspect element:


To disable save as in an HTML page, you must disable Control+S Command and also right-click on the page.


To disable some Keys used with ctrl key & ctrl+shift key


Inspect Element is one of the useful highlights that can view, modify, and even modify HTML code retrieved from the source site via the browser. In addition, it can also compromise the security of the site. So by disabling inspect element, it is useful and it becomes very important to disable it in order to avoid unwanted things.

If you want to remove right click also from website, you can follow this post till the end to know various ways that aim to secure website from inspect element in browser using javascript code.

How to disable right click on web page using JavaScript?


To protect content such as images on web pages or to protect source code or for other security reasons, we need to disable right click on web pages. Through this blog, I explain the procedure to disable right click with JavaScript.

There are many methods to achieve this. The HTML DOM addEventListener() and preventDefault() methods are some of these procedures. This code will disable right click by adding an event listener for the event contextmenu. This code will help you in protecting your web pages. Here's the javascript disable inspect element code:


I'm sure code like above will save your content from being copied by others.

How to Make Your Blog Unable to Inspect Element


Here's how to prevent blogs from being inspected:

  • First login to blogger.
  • On the blogger dashboard select the Theme menu > CUSTOMIZE > Edit HTML.
  • After that copy the following code and paste it just above the closing tag </body>.


  • After that save the theme.
  • Finished...

Then you can preview it directly in the browser and try to inspect the element or right click as you did before. If the website or blog page is successful, it will not be able to check the element or right click. By doing this technique, I believe that other people will not easily perform element checking system operations on the blog pages that you manage.

Conclusion


Now you have successfully disabled 'Inspect Element' and 'View Page Source' Option of your website on browser like chrome or any other browser. If you are still confused or want to know something, let us know in the comments column, we will reply to your positive comments as soon as possible.

Thus this post about How to Disable Inspect Element. Hopefully this article is useful and can help you. Let's share this article to help other friends. Thank You!
Previous Post
2 Comments
  • Samuel
    Samuel January 1, 2024 at 1:47 PM

    Test

  • Samuel
    Samuel January 1, 2024 at 1:50 PM

    PING!!!

Add Comment
comment url