We have a WebSocket connection in our site which was working in IOS 14 Safari browser. Since the upgrade to IOS 15, the WebSocket gets closed after the user gets to another application. When we turn off the experimental NSURLSession WebSocket in advanced settings, it works again. Believe this is causing lots of issues in other developers as well. Please kindly look into this asap
WebSocket issue in IOS 15 Safari Browser
I have the same problem. When Safari is switched to the background the websocket server recognizes the client going away and closes the websocket. When Safari gets to the foreground again, onerror and onclose events are received which allow my site (web-based smart home framework) to re-establish the connection to the websocket server.
This may work for hours of inactivity but at some point in time after longer inactivity, the onerror and onclose events will not be received any more. So the site can not recognize the dead connection. In former iOS versions the events have been available over much longer periods. Still my iPhone performs much better on that than the iPad on iPad OS.
Are there any browser events I can use to detect the device waking up? Any programmatically controllable options to keep the websocket events available in the buffer for long time?
Thanks and best regards