Click here to Skip to main content
15,895,142 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
How to write a code for disabling view source from mouse right click


What I have tried:

How to write a code for disabling view source from mouse right click
Posted
Updated 22-Jun-18 22:25pm

Quote:
How to write a code for disabling view source from mouse right click

Mouse right click is only 1 way to view page source code, with FireFox, menus also offer the possibility to view page source code, and this, you can't disable.
 
Share this answer
 
You can do it: javascript - How do I disable right click on my web page? - Stack Overflow[^] - but it won't "protect" your site. For example, in Chrome, F12 will open the "Inspect" menu which gives you full access to the source, and you can't disable that in your code to the best of my knowledge.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900