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.
How To Disable Right Click on Web Page or Hide Page Source Code

What is Page Source Code

Page source code is a type of file that contains your html, java script, css, php etc code that is used in any web page to design it. Simply, this features is per-installed in all web browsers and support all websites hat doesn’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 google.com




  1. Right click on mouse and you will find some options in that list.
  2. Select “View Page Source”.
  3. You will get 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 different. You are here to know how to disable right click button on mouse for any web page. We will tell you all the steps to do this things with simple steps. Read carefully below steps and do same-

For BlogSpot users-




  • 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">
document.onmousedown=disableclick;
status="www.HowToCrazy.com";
Function disableclick(e)
{
  if(event.button==2)
   {
     alert(status);
     return false;  
   }
}
</script>
  • Now, go to your template and find 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 above script code.
  • Open Designing Cod and paste this script code within the head section anywhere.
  • That’s 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 🙂

2 COMMENTS

Drop a Comment