Monday, July 26, 2010

Detect Firebug console using Javascript

Hi Developers,
Nowadays Firebug console is one of the best tool to debug html or javascript or AJAX or css. In the same time it allows any user to see the datas passed in between the pages. It is not a secure method for our website. Gmail has blocked firebug console because of this activities. You can able to login to gmail with firebug console but it will say that "If your firebug console is ON, then gmail will become slow". So you definitely switch off your firebug console. So in the same way, we save our website from firebug.

You can prevent this using javascript.

In your page load call this function
  
<script type='text/javascript'>
function blockfirebug(){
if(window.console.firebug!=""){
document.location.href="firebug_error.html";
return false;
}
}
<script>


<body onload='return blockfirebug()'>