Im enjoying myself working on a mobile web app but Im running into trouble if you leave the browser and come back later. What Id 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 its making a connection. I assume that if the connection failed then the disconnected message would be displayed? Except nothing happens. Ive 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!
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 Im 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 doesnt 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 doesnt do anything!
Ive 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 its just completely hosed. Im not sure how to solve that yet.