Annoyance and Figuring Out Why Using Firefox Profiler

If you ever hit the situation where a website causes your browser to hit 100% CPU usage, you should install Mozilla Firefox Profiler and then launch the Profiler Tab (Tools > Web Developer > Performance).  You can then see v4.motads.com is sucking up so many resources.  You can hit almost any major site, and see these requests.

Profiler
Profiler

I found the reason documented by the Electronic Frontier Foundation https://www.eff.org/deeplinks/2013/06/third-party-resources-nsa-leaks

 

Also, you should look at https://panopticlick.eff.org/index.php?action=log&js=yes and see how trackable you are

Mastering Firebug NetListener

In more recent versions of Firebug, the developers pulled out the integrated Firebug trace function.  If you want the functionality, you should install the FBTrace Extension; it’s almost required if you want to develop a Firebug Extension. The FBTrace Extension is at https://getfirebug.com/wiki/index.php/FBTrace 

I built an extension following the following tutorials and code:

http://www.softwareishard.com/blog/firebug-tutorial/extending-firebug-hello-world-part-i/
http://www.softwareishard.com/blog/firebug-tutorial/extending-firebug-net-panel-listener-part-viii/
https://code.google.com/p/fbug/source/browse/examples/firebug1.4/netlistener/chrome/content/netlistener/netListener.js
https://github.com/firebug/firebug/blob/4ced8f9cbf05ddd901aeb99895c9270abbf5d29a/extension/content/firebug/net/netUtils.js

The extension logged out the details of API requests to specific applications and filtered on those requests so I could debug an issue when loading multiple of them on the same page.

A couple tips for developers using the NetListeners are:

The url and parameters are in file.href
The method is file.method
The headers are an array which can be retrieved from file.requestHeaders property.  Each object is a name – value pair. header.name / header.value.
The requestBody is really file.postText
The responseBody is best returned using netUtils.js context.sourceCache.loadText(file.href, file.method, file)