Phonegap not propagating the session cookie

馋奶兔 提交于 2019-12-06 03:04:30

问题


Using Phonegap-3.0.0+ios6.1, on a real iphone, on a real https domain handling the server side, many responses from different sources lead me to many trials and failures to deal with session cookies, I still cannot handle it correctly on an Iphone5+Phonegap app, although everything works perfectly in Iphone5+Safari.

Sources of info & Understanding

  • Cookies-in-PhoneGap. This suggest to use another transport mechanism to exchange the cookie between clients and server. Deal with the cookies on the wire (javascript set:document.cookie=... and get:xhr.getResponseHeader('Set-Cookie')) and keep it in Phonegap-html5-LocalStorage, to fetch it and reset it in the next ajax request.

  • Iphone & Phonegap. I have located this cocoa code in the file app>Classes>AppDelegate.m. I do not think I have to modify it. It seems by default activated. My php server still tell me Your session has timed out, or you have disabled cookies..

I have been dealing with this client-server for months in different contexts, always worked, until phonegap came into the picture.

Questions

  1. From the web readings, phonegap should already be set to go for cookie support. Right or not ?
  2. Does Phonegap really handle cookies by default (as is when creating a project) ?
  3. Is cookie handling transport mechanism must be implemented by the developer ?

Thanks in advance.

来源:https://stackoverflow.com/questions/18659905/phonegap-not-propagating-the-session-cookie

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!