Native JS, using AJAX, taking GET as an example
Previously, the network was interrupted after 1 second of AJAX submission (the request content was not returned within 1 second due to network and program reaction reasons), but after the network was restored (with a short timeout A few seconds later) but the request content can continue to be received.
If there is no network currently, and then click Submit AJAX to restore the network one second later, in this case, after the network is restored, will AJAX continue to send requests?
?
Not necessarily.
After AJAX sends a request, it cannot determine whether the network has been disconnected (now HTML5 has added the network status API), so ajax will continue to be sent until timeout. If you reply to the network before timeout, ajax will also be sent.