iOS 12.2 tries to break web apps reloading

That fantastic feature of web apps to reload themselves after they have timed out is at least partially broken on iOS 12.2 that came out last week.

Specifically for web apps that you’ve saved as home screen shortcuts. My initialy impression was fantastic! They now let the pages stay active in the background so they don’t reload every time you go back to them. Which is awesome, you can switch to another app and then switch back to the Xojo web app and it doesn’t reload back to the beginning every single time! Unfortunately that seems to come at the price of being stuck completely at the “this app has gone offline” message sometimes, but not all the time.

If you come back to the app during some period after the session timeout, but before some other unknowable time, it will show you that error message but then reload in a second or 2 and all is well. If you leave it a little longer than that however you get stuck at the this app has gone offline page and the reload no longer works. Then if you want some hours more it will start from scratch and reload you from the beginning.

It feels like there is a time frame, or an error condition, that causes that reload mechanism to give up? It needs to not ever give up :slight_smile: Unless thats enforced by the phone which is possible. It’s not just a xojo problem, in order to get around it just a little bit ago I actually restarted my phone but I was too fast at getting back to it and loaded the page before the wifi and cell radio had connected so I ended up with a “safari cannot load this page because you’re not connected to the internet” error and that stuck as well. Every time I loaded the shortcut thats what I was shown, even after doing the force quit on that web app and loading it again it just stuck there. Then a couple of hours later it loaded up fine again. So I do think this is an iOS problem more so than a xojo one, but still the reconnect javascript should never give up! And perhaps it should offer a button to ‘click here if your page doesn’t reload” type thing. I know I can add that myself, and as soon as I’m done typing this I’m heading off to go do so, but given the new cruelness it should be the default.

What you are describing is the difference between whether or not JavaScript is still running. If it is, the framework can tell that a significant time has passed and that it needs to reload. If not… there’s no code running anyway.

I get that, but it’s definitely different now than it was.