I have experienced that iOS4 drops cookies when you start/exits a web app saved to the dashboard (full screen mode).
Is it true and is there a workaround?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It’s not a bug, it’s a feature. Session cookies (i.e. cookies with a lifetime of 0) are dropped at the end of the browser session — which, in the case of a full screen web app, happens as soon as you leave the web app. If you want them to persist, just set your cookie lifetime to something larger than the default 0 (I use 1 year).
Now your question might be: how do I set my cookie lifetime? Assuming you’re using PHP, the piece of code would be:
If you’re using PHP sessions, you will have to rewrite the cookie to add a lifetime greater than 0:
Normally, you shouldn’t have to rewrite the session cookie in order to change the default lifetime, as the function
session_set_cookie_paramsshould let you do just that, but I found it’s not always the case.