Refresh . Although my answer is closing, I think this is the easiest way to handle iOS forced reboots. My strategy does not stop the web application from reloading upon opening, but it gives you an easy way to keep the session active so that you can detect and restore the session from the server side so that the application flow is not (at the request of the OP).
NB; this works easiest if the pages of your web application are always accessed by the same URL (for example, http://webapp.yourdomain.com/index.php ); if not, you will need to save the user’s location in the server-side session data and redirect the user there when he enters your web application through the main URL.
As already mentioned, this allows you to save the state unscathed even between rebooting the device, therefore, even though the technical support of the web application does not restart when starting from the main screen, it seems to me that this is the easiest way to restore the state for the user without it replacing the reboot.
A less straightforward solution than using local storage is to extend the session cookie lifetime. This works through web applications (if they point to the same page, of course) and even between the web application and the regular web version of your application.
The trick is this:
// Start or resume session session_start(); // Extend cookie life time by an amount of your liking $cookieLifetime = 365 * 24 * 60 * 60; // A year in seconds setcookie(session_name(),session_id(),time()+$cookieLifetime);
For a more detailed discussion of this strategy, you can take a look at my answer to this question:
Maintain PHP session in web application on iPhone
Wilbo Baggins Jan 30 '13 at 9:57 2013-01-30 09:57
source share