0

I am creating a speed test application which measures a users upload and download speed by timing how long it takes to upload and download various files. At the moment I am using Javascript to download an image from an external server using the following code:

var start_time,end_time;
var download = new Image();
download.onload = function () {
    end_time = (new Date()).getTime();
    download_duration = (end_time - start_time) / 1000;
    finish_download_test();
}
start_time = (new Date()).getTime();
download.src = 'www.fakeimage.com/image.jpg';

This works, however, I would like to display a progress bar whilst the image downloads. I have seen html5 and c# solutions, however, I would like something that is compatible for more browsers (so no html5) and I am using a combo of php and javascript so the c# solution doesnt help either.

Any help would be greatly appreciated, even if it was just a nudge in the right direction.

user1357607
  • 214
  • 4
  • 13
  • 1
    Without HTML5 and cross-browser, it's Flash. Since "giving a damn about load times" and "older browsers" doesn't fit together, use HTML5. – tomsseisums Jul 17 '12 at 09:06

1 Answers1

0

You can use flash for progress bar. Download files through flash and pass percent to HTML via js or just use flash display.

ymutlu
  • 6,585
  • 4
  • 35
  • 47