Web connection on iOS go dead without displaying error message

Good Morning!

I’m enjoying myself working on a mobile web app but I’m running into trouble if you leave the browser and come back later. What I’d expect to happen is that if the connection or the session times out then it should display the disconnection error message with my instructions to just reload.

But what actually happens is that the last page you were on continues to be displayed forever but wont actually do anything. When I click on a button the spinning display next to the wifi status flashes as if it thinks it’s making a connection. I assume that if the connection failed then the disconnected message would be displayed? Except nothing happens. I’ve let it sit there for half an hour in this condition and the error message never displays.

I need to either properly show the error message, or maintain the connection and session and whatever else is necessary. This is not a high volume situation, just a couple of clients per server at most so keeping the sessions alive longer would not be a problem resource wise.

Sometimes if I just leave it sit there a while it manages to reconnect and will become live again, but this can take several minutes.

Any thoughts or suggestions of where I should look next for a reason greatly appreciated. thank you!

On the Session.TimeOut event why not ShowURL to the login screen?

The app has disconnected. No events will fire on the server app.

Travis Hill shared an idea on how to deal with iOS web sessions in a 2013 thread:

https://forum.xojo.com/1338-web-edition-on-ios-sessions

See his June 3 2013 entry.

I have never implemented it myself.

Edited to fix URL while also linking directly to individual post.

thats a very good solution for reconnecting a session, but thats much more complicated than my problem. I just want a disconnect message if the app is disconnected. On iOS, if you go away from the browser and come back a few minutes later chances are that the page will still be displaying the old data. But if you click nothing happens. I would think that an error in the javascript connection would result in the displaying of the disconnected screen. They are either ignoring such errors to avoid disconnection messages, or the errors are not firing. I WANT the disconnection message if I’m disconnected.

That would be fine, just click reload. I could even alter the text of the disconnection screen to provide a click here to continue link. But it doesn’t give you that screen, it just sits there taking your clicks but doing nothing. I can see that it lights up the network active display, but it doesn’t do anything!

I’ve got a great app working now except that if you leave it open in the iOS browser when you open some other app and then come back a little later it’s just completely hosed. I’m not sure how to solve that yet.