Re: How does the network tab work?

54 views
Skip to first unread message

Jan Honza Odvarko

unread,
Jul 13, 2012, 10:43:20 AM7/13/12
to Firebug
On Jul 13, 2:38 pm, Simon Ferndriger <ferndriger.busin...@gmail.com>
wrote:
> Hi
>
> I am interested in detecting when an image resource is loaded in any
> possible way (by JavaScript new Image(), by <img src="">, as background
> image via CSS, etc)  with JavaScript.
> When opening Firebug and selecting the network tab, there is exactly this
> list showing.
>
> How do you do that?

Firebug is using:
nsIHttpActivityObserver
nsITraceableChannel
nsIObserver (for HTTP envents)

Checkout these pages:
https://developer.mozilla.org/en/Monitoring_HTTP_activity
https://developer.mozilla.org/en/XPCOM_Interface_Reference/nsIHttpActivityDistributor

And firebug source code here:
https://github.com/firebug/firebug/blob/master/extension/content/firebug/net/httpActivityObserver.js

Honza
Reply all
Reply to author
Forward
0 new messages