-1

Is there a library or native javascript way for calculating the amount of data that was send and received in bytes by visiting a site? e.g. How do I measure the size of a get request in bytes?

Manolis
  • 167
  • 1
  • 12
  • 2
    Please describe what you mean exactly by "amount of data". Also, please share the research you've done so far (and do it if you haven't). – hon2a Nov 25 '14 at 08:44
  • 1
    I think this has been answered here: http://stackoverflow.com/questions/890221/how-to-get-current-page-size-in-kb-using-just-javascript – JPS Nov 25 '14 at 08:49

1 Answers1

0

Do you mean this?

$(document).ready(
    function()
    {
        var pageData= $('html').html().length;
    }
);

this will get you the data size in MB.

Sreeraj
  • 316
  • 1
  • 8
  • This seems to fail horribly on `` – Bergi Nov 25 '14 at 08:53
  • Something like this but this will only get me the size of the page that I've just visited not any requests... How do I get any requests or new data loaded? – Manolis Nov 25 '14 at 08:58