Making XMLHttpRequests in iOS WKWebView when idle (in background) and locking screen causes the request to error out and we get this in the safari console log:
Failed to load resource: The network connection was lost
Does anyone know why Safari closes the connection? Or is it the server closing the connection?
Any help would be greatly appreciated.
Contacted Apple support, this is actually done by design. WKWebView has been "optimized" to not make network connections while screen is locked.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With