Home  /  Coding   /  How To Secure Web-Apps From Developer Tools Of Browsers | AV Coding

How To Secure Web-Apps From Developer Tools Of Browsers | AV Coding

Hey guys welcome to AV Coding

Today we will learn how to secure web apps from the developer tools of web browsers using JavaScript.

The complete code is explained in the video below and the source code is provided below.

<!DOCTYPE html>
	<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
	<meta content="utf-8" http-equiv="encoding">
	<div id='content'>
		<h1>hello world</h1>
		<a href="#" onclick="OpenLink('index.html')">open me</a>

	<div id="contentShow" style="display: none;">
		<h1>Close Console</h1>

<script type="text/javascript">

	var htmlBackUp = '';
	window.addEventListener("resize", orignal);

	function orignal()
	    if ((window.outerHeight - window.innerHeight) > 100 || (window.outerWidth - window.innerWidth) > 50){
	    	if(document.getElementById('content').innerHTML.replace(/<!--(?!\s*(?:\[if [^\]]+]|<!|>))(?:(?!-->)(.|\n))*-->/g,"").trim()){
	    		htmlBackUp = document.getElementById('content').innerHTML;
	    		document.getElementById('content').innerHTML = "";
	    		document.getElementById("contentShow").style.display = "block"; 
	    	if(htmlBackUp.replace(/<!--(?!\s*(?:\[if [^\]]+]|<!|>))(?:(?!-->)(.|\n))*-->/g,"").trim()){
	    		document.getElementById("contentShow").style.display = "none";
	    		document.getElementById('content').innerHTML = htmlBackUp;
	function OpenLink(link){, 'newwindow', 'width='+window.outerWidth+',height='+window.outerHeight);		


<script src="" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script type="text/javascript">
	$(document).keydown(function (event) {
		if (event.keyCode == 123) {
			return false;
		else if (event.ctrlKey && event.shiftKey && event.keyCode == 73) {
			return false;
	$(document).on("contextmenu", function (e) {

Hope You Liked This Blog. Share, Comment, Subscribe And Press The Bell Icon In The Bottom Right Side For More Code Feeds.