Categories: Website

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.

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 google.com
    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 blogger.com
    • 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 the closing head section. section.
  • Just paste the above script code before closing the head section, as shown in the image.

  • 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 🙂
Shani Deshwal

Hi, I am Shani Deshwal. I am one of the two creative minds behind this blog. I am a professional blogger and entrepreneur from India. I have attended Google DevDays and Google App Excellence Summit 2017.

Recent Posts

Your Guide to Turning Old Jewelry into Cash

Selling old jewelry not only declutters your home, but it can also provide an opportunity… Read More

4 days ago

Innocams Epic: Redefining Security with Cutting-Edge Surveillance Technology

In the rapidly evolving world of video surveillance technology, one name stands out for its… Read More

2 weeks ago

Preparation to Apply for a Tennessee Real Estate License

If you are in Tennessee and planning to become a real estate salesperson, agent, or… Read More

2 weeks ago

A Guide to Transforming Your Garden with Lighting

Lighting plays a crucial role in accentuating the beauty of your garden, turning it into… Read More

3 weeks ago

Navigating the Controversy: A Deep Dive into Enfamil Lawsuits and Mead Johnson

Mead Johnson's Enfamil formula has long been a trusted name in infant nutrition. However, recent… Read More

4 weeks ago

The Role of Contact Hours in PMP Certification

A Project Management Professional (PMP) certification is a major accomplishment in project management. Professionals who… Read More

4 weeks ago