Reputation: 2035
I need to measure download and upload speed from my server to browser in the browser.
The main problem is that it must work in ie 8 and firefox 3.6 and I'am not allowed to use flash or an applet.
The server backend is tomcat.
Doing it in html5 and xhr 2 was no problem, but now I got stuck.
I you the download measurement running so far.
But I have no really idea to measure the upload.
Any ideas or suggestions?
Upvotes: 0
Views: 530
Reputation: 43053
Try this JS code:
var start = new Date().getTime();
// Call your server here...
var time = new Date().getTime() - start;
alert('Response fetched in ' + time + ' ms');
DEMO http://jsfiddle.net/pXnDR/
Since you need to use quite old browsers, I provided here a plain vanilla Javascript solution without the use of any modern libraries like jQuery, ExtJS etc
Upvotes: 1
Reputation: 845
If it doesn't have to be automated, try using built-in Developer tools to measure the response each upload/download takes:
IE 8:
http://msdn.microsoft.com/en-us/library/dd565628(v=vs.85).aspx
Firefox 3.6 (using Firebug):
https://addons.mozilla.org/en-US/firefox/addon/firebug/
These work similarly to the Chrome browser Developer Tools, and can help track response times of live sites
Upvotes: 1