In order to analyse page load performance I need to know the total network size of all the resources on a page (html, static content). Is there a way to do this on the client side with javascript?
Clarification: The data needs to be sent to a server for analysis, so I need access to network size in javascript.
There is ongoing effort called Navigation Timing to profide such a thing:
http://www.html5rocks.com/en/tutorials/webperformance/basics/
The article explains how modern browsers are implementing an API to better access performance information. The most interesting part is about the processing model, you can also read about it on the w3 site:
http://www.w3.org/TR/navigation-timing/#processing-model
According to the article the simplest way to try out the API is
to take a look at window.performance
in your browser's JavaScript console.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With