I would like to download a 512 kb file and check the download time. I use the following codes, however it checks just response time of website and is not waiting until entire file is downloaded. How can I check entire file download time?
var start = new Date();
$.ajax ({
url: 'https://www.example.com/512kb',
cache: false,
success : function()
{
var total=(new Date() - start)
},
error : function(jqxhr, status, ex) {}
});
Edit: When I run the website at my local PC, internet explorer is waiting until all file is downloaded, Firefox and chrome not. If I put to server all behaves same and not waiting for all file. Why just at local side internet explorer behaves like that?