iphone bookmarklet cookie persistence

Posted by Larry Davis on Stack Overflow See other posts from Stack Overflow or by Larry Davis
Published on 2010-03-23T21:55:44Z Indexed on 2010/03/23 22:03 UTC
Read the original article Hit count: 609

I have an iphone (jqtouch based) web app that uses cookies for authentication. The use flow is as follows :

  • user goes to the mobile landing page and is instructed to save the page as a bookmarklet on their home page.

  • they launch the bookmarklet to go to a login page to login and get a cookie.

  • the cookie works and they can navigate throughout the web site.

  • However this session cookie is not persistent. If they leave safari and then restart using the saved bookmarklet, the cookies set during their previous session are gone.

  • Just using safari (ie: launch safari directly rather than through the bookmarklet) to navigate the pages works fine (ie: start safari, go to url, do login, restart safari, go back to url).

  • I find that that the cookies that were active when the bookmarklet was created are persistent but any cookies set during the session when safari is accessed through the bookmarklet are not persistent.

  • I'm wondering if this is a safari/iphone issue and/or if there is any way around this. Many thanks for any insight you can provide.

© Stack Overflow or respective owner

Related posts about iphone-web

Related posts about session-cookie