Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does the Firebug network monitor work?

In the Firebug add-on for Firefox, how is Firebug able to get the connecting, waiting, and receiving time? Also, how is it that Firebug can know the file size before the file is even finished loading?

Is JavaScript used in these calculations, or does Firebug use another method altogether?

like image 282
ilumin Avatar asked Aug 13 '11 16:08

ilumin


1 Answers

Firebug plugs into Firefox and can fetch data from there. The webserver maybe sends a Content-Length HTTP header, so this is the expected size of the downloaded file. Firefox puts all resources to load into a queue while parsing the website. The time from putting an item into the queue until it is fetched can be considered "waiting time". The HTTP fetch engine from Firefox can give information about how long a connect() to the server takes.

So to put a long story short, I believe Firefox has an API so that extensions can fetch information like that from the engine.

like image 99
Shi Avatar answered Sep 19 '22 11:09

Shi