PDA

View Full Version : disable firebug on production website?



rballman
12 Oct 2009, 10:43 AM
I like using Firebug for debug purposes and seeing what XML data is being return from the database, however I do not want website users to see this sensitive data. Any information on how to disable firebug on production website?

Thanks!

aw1zard2
12 Oct 2009, 11:03 AM
This is something I use before doing the EXTJS files.
There might be a better way to do it.
This code was found on this website.

http://www.geekpedia.com/code147_Disable-The-Firebug-Plugin.html


if (!("console" in window) || !("firebug" in console))
{
var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
window.console = {};
for (var i = 0; i <names.length; ++i) window.console[names[i]] = function() {};
}

wuschba
12 Oct 2009, 11:18 AM
You must be aware that if you disable firebug, other plug-ins or browsers or network-sniffers will still be able to read the data. At least IE8 comes with some kind of debugger.