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 by a 4 line script code. You can hide all your 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 features is pre-installed in all web browsers and support 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 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 google home page.

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

Now, its 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 with simple steps. Read carefully below steps and do 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 above script code before closing head section, as shown in 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 page’s source code with this script code. You can hide all source codes for your website so that no one can steal your code. Its a really simple trick to hide page source and to disable right click button on a web page. Make a comment below with your website URL to let us check 🙂