I'm implementing a networking system in JavaScript (frontend) that will push the requests in a custom queue when there is no internet. The requests will be done, in the exact order, once the computer is re-connected.
The issue I'm having is that if I do the requests one by one, it might take very long to complete them all, and a browser can easily handle multiple requests at the same time.
My question is how can I push as many network request I can without overloading the browser with too many requests? Is there a common JS property that can be used, or something I can use to optimize the number of requests I can simultaneously do without overloading the browser?