How to animeready progressbar with xhr?
Upload the file to the server... Deduce in the console the download progress in %. There is the following picture:
9%
22%
38%
75%
100%
Is it possible, and if so, how to make the progress started from 0% and increased by +1%, i.e. to instead of what I described above is kinda 0%, 1%,2%,3% etc.
2 answers
Probably unlikely you will succeed. File loaded parts (chunks), when one part is loaded - the server gave you the answer and you see %. While the part is loaded, the server gives you nothing, and waiting for the download is complete, this part. I.e. hypothetically possible to load the file in very small pieces to get to 1%, but it would not be right - too many queries will be run for the server.
Find more questions by tags jQuery