I'm not sure what this would be called to know what to search for, if this is a duplicate please link me :)
Is it possible in JavaScript in a browser, to load an external file (this bit is easy), but given that the external file could be rather large (say 50MB) show a progress indicator of the loading of that file?
i.e I, knowing the serverside size of the file, not knowing the gzip size, I want to say X% of file loaded.
I've not tried anything, I can't find anything to work from let alone find something that suggests its possible.
Problem: Trying to load up a 50MB JavaScript library on demand but show the progress of the loading.
I'm not sure what this would be called to know what to search for, if this is a duplicate please link me :)
Is it possible in JavaScript in a browser, to load an external file (this bit is easy), but given that the external file could be rather large (say 50MB) show a progress indicator of the loading of that file?
i.e I, knowing the serverside size of the file, not knowing the gzip size, I want to say X% of file loaded.
I've not tried anything, I can't find anything to work from let alone find something that suggests its possible.
Problem: Trying to load up a 50MB JavaScript library on demand but show the progress of the loading.
Share Improve this question asked Nov 16, 2013 at 5:07 PhillPhill 18.8k7 gold badges65 silver badges103 bronze badges 4- 50MB is huge! Is there any way to split this up into multiple files? Or reduce the size somehow? – Cameron Tinker Commented Apr 8, 2014 at 15:29
- 1 @CameronTinker - bgrins.github.io/videoconverter.js this is the library. I want to do pre-upload video file checking :) – Phill Commented Apr 8, 2014 at 16:01
- That's impressive! I will have to research this some more! I see on their website, they have a loading image indicating that the library is loading. – Cameron Tinker Commented Apr 8, 2014 at 16:06
- Related issue github./kripken/emscripten/issues/613 – anatoly techtonik Commented Jan 28, 2015 at 13:26
1 Answer
Reset to default 6Use XMLHttpRequest to load the script and monitor its progress. When it's done, eval()
it.