How To Disable Right Click on Web Page or Hide Page Source Code

Hello bloggers & developers, this article is mainly for you guys. This article will help you to hide your web page source code and disable right click on a web page with a video tutorial. You can do these things with a 4 line script code. You can hide all the source codes of your website and blog. With this script code, no one can view/steal your web page’s code.
disable right click on web page

What is the Page Source Code

Page source code is a type of file that contains your HTML, Javascript, CSS, PHP, etc code that is used in any web page to design it. Simply, this feature is pre-installed in all web browsers and supports all websites that don’t have script code to disable it. Page source code is used to view web page code or steal any important code.

How To View Page Source Code of any Web Page

If you want to view the page source code of any web page, just do simple steps as follows-
    1. Open
    2. Right, click on the mouse and you will find some options on that list.
    3. Select “View Page Source”.
    4. You will get the source code for the google home page.

How To Disable Right Click For Web Page or Hide View Page Source Option

Now, it’s time to do differently. You are here to know how to disable right-click button on the mouse for any web page. We will tell you all the steps to do these things in simple steps. Read carefully the below steps and do the same.

For BlogSpot users-

    • Open
    • Select your blog in which you want to add this feature.
    • Go to ‘Template’ and then select ‘Edit Template’.
    • Now, copy below script code –
<script language="javascript">
Function disableclick(e)
     return false;
  • Now, go to your template and find the closing head section. section.
  • Just paste the above script code before closing the head section, as shown in the image.

How To Disable Right Click on Web Page or Hide Page Source Code

  • Save your template and visit your website and comment below with your URL to let us check your job.
  • That’s it.

For Web Developers

  • Just copy the above script code.
  • Open Designing Cod and paste this script code into the head section anywhere and that is it.
Last words – You can easily hide all web pages’ source code with this script code. You can hide all source codes for your website so that no one can steal your code. It’s a really simple trick to hide the page source and disable right-click button on a web page. Make a comment below with your website URL to let us check 🙂


Comments are closed.