I make a 10 request to the server with fetch and reload that every 5 sec. After 1 minute the browser is frozen.
Chrome only works with 6 requests at the same time and hold all other request stalled.
everything is frozen (scrolling the page, zoom in a map) till the request finished.
Is there a way that Chrome work with all request at the same time?
Is there anything that I make wrong?
I tried to work with async fetch and with Xhr request but everywhere the same result.
const headers = new Headers();
headers.set('Content-Type', 'application/json');
let _options = {
credentials: 'include',
cache: 'no-cache',
mode: 'cors',
redirect: 'follow',
referrer: 'no-referrer',
headers
};
fetch(url, _options).then(
response => {
if (response.status !== 200) {
console.log(`Looks like there was a problem. Status Code: ${
response.status}`);
return;
}
// Examine the text in the response
response.json().then(data => data);
}
)
.catch(err => {
console.log('Fetch Error :-S', err);
});