I want to calculate how much bandwidth a some Javascript code will consume, based on what I’m seeing in Chrome’s developer tools.
The script is initiated through a one-liner Javascript tag, referencing the external JS file.
In the looking at the Initiator and Size Columns:
Initiator Size
-------------------------------------------
Default.aspx 4.39kb
Parser 10.54kb
That Javascript file exists on my server, so I want to calculate how much bandwidth each call will consume from my server connection (not where Default.aspx resides).
So my server serves up the .JS at 4.39kb – or is that the bandwidth consumption for the request, and the response is 10.54kb?
What does the parser portion refer to, and is it safe to say that the total bandwidth usage to serve up a response for this request 15.47kb from my server?
Thanks.
You’re reading the columns wrong. The two values for the initiator you’re seeing are completely unrelated to the two values you’re seeing for size for each resource.
The “Parser” value for the initiator means the parser came across a
<script>tag and loaded it (or an<img>tag, whatever). A “script” value means a piece of JavaScript demanded the loading of the resource (e.g. setting thesrcof an<img/>or via AJAX).The top value in the “Size” columns is what Chrome calls “Size” and the second (smaller/ gray) value is the “Content”. Quite what these mean, I’m trying to work out.
It’s true that the total bandwidth usage will be the sum of some values from the Size column… but I’m not sure whether it’s the top or bottom value. It’s also completely unrelated to the “Initiator”.