Is it possible to send multiple fetch requests in parallel, exceeding the maximum browser's support for parallel requests? Will the browser automatically handle all the requests or should I reduce them into smaller batches and chain them together?
Promise.all([allpromisses])
Alternatively, is there another solution like this:
function fetchAll(urls) {
const requestPromises = urls.map(url => {
return fetch(url).then(response => response.json());
});
requestPromises.reduce((chain, requestPromise) => {
return chain.then(() => requestPromise)
.then(data => data);
}, Promise.resolve());
}
or
getBunch([promises1]).then(getBunch([promises2]). ...