Upload large files, obtain the upload progress through the interface, and constantly update the progress. If the browser is not operated for about 20 minutes, the upload will be interrupted and an error net:: err will be reported_ NETWORK_ IO_ SUSPENDED
reason:
It is a protection mechanism of Google browser. If the web page is not operated for 15 minutes, the network request will be interrupted.
Solution:
Create a div with an interval of time to simulate the mouse click event and automatically trigger the click.
let timeDiv = document.createElement('div'); document.body.appendChild(timeDiv); interval = setInterval(()=>{ timeDiv && timeDiv.click(); },1000*10);