Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone web-app from home screen always reloads switching between apps

I'm working on a mobile web app (website) that requires you to add it to the home screen. When you open it, and switch to another app, then go back to my web app, the whole app reloads. It shows the splash screen and doesn't even remember where you last were.

Is there a way around this? I can't find any details in the iOS docs.

like image 789
dallen Avatar asked Jul 23 '12 16:07

dallen


People also ask

Why do my apps reload when I swap between apps?

This has to do with how much RAM the device has. That device has 2 GB of RAM, which is pretty "weak" these days. With that little RAM, the OS has to aggressively unload apps from memory to make room for the next app you're opening (which then needs to load into RAM).

Why does my iPhone keep switching my apps around?

If you've ever rearranged the apps on your screen or deleted an app from your phone, you've seen icons shaking. That's because shaking icons mean that the iPhone is in the mode that lets you move or delete apps (in iOS 10 and up, you can even delete some of the apps that come built in to the iPhone).

Why does my iPhone keep reloading apps?

Background App Refresh allows the apps on your iPhone to automatically search for new information even if they're not directly running on the screen. On Android devices, the background refresh function allows background data usage, and it works the same way.


1 Answers

It seems that this topic will answer your question.

You can't avoid this refresh behavior. You should work with the HTML5 local storage to persist the state of your application and use it when the application is launched to restore his state.

Here is a link to the Safari Developer Library focussing on your question.

like image 184
StarkOverflow Avatar answered Sep 22 '22 05:09

StarkOverflow