3 ms·
You don't need websockets to simply listen to the ProgressEvent, you should know that. https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/progress
by maccolgan 5y ago
You don't need websockets to simply listen to the ProgressEvent, you should know that.
https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/progress_event https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequ...
- onion2k 5y agoThat tells you something is happening, and how much has been done, but not how much work there is left to do, or how much back pressure (load) there is on the server side. Consequently you can't work out how far along the progress is or how long is left. If you assume that there'll be a consistent amount of progress you can guess, but for a large upload (eg gigabytes) you'll usually be wrong. If the server could send data back to update the progress event it would be really nice. Right now though, that can't be done (as far as I know.. maybe there's a way now.. I haven't looked for years.)