jQuery MobilePHP Site - How to Stay Logged In

  You are currently not logged in. You can view the forums, but cannot post messages. Log In | Register

17-Apr-12 01:00
I've created a jQuery Mobile site with PHP which requires authentication and is so far working well. Users on iPhone/iPads are encouraged to save the website to the home screen as a web clip to give them direct access to the site without the safari toolbars etc.

On iOS devices when a user clicks the home button or gets a phone call and they return to the site they are logged out and have to login again. This doesn't happen when they access the site directly from Safari.

Is there a way to have them remain logged for a period of time (e.g. 15 minutes) when they are accessing the site from a web clip on their home screen and get a phone call or click the home button?
04-May-12 05:09
@databuzz: If I remember rightly, when you switch to a website that was launched via the home screen, the uiwebview ("browser") instance that was displaying the website is effectively restarted, losing any session cookies. Try adding a timeout to the cookies so they're "permanent" cookies instead of session cookies.

--
Matt Doyle, Elated
3rd Edition of my jQuery Mobile book out now! Learn to build mobile web apps. Free sample chapter: http://store.elated.com/

 
New posts
Old posts

Follow Elated