I am trying to convert a website to a phonegap android application. The web server sets the session id on the client as a cookie. This session id has to be maintained for the complete session.
When I move from one page to another ( the second page is a local html file in the app), using href, or window.location, or navigator.app.loadUrl, it loads the second page in a browser, and the cookies get destroyed, so I can't make an valid ajax request from the second page.
I wouldn't prefer putting all the pages in a single html file ( like jquery mobile) . Given that I have seperate html files, how to navigate between them, such that the second page is loaded in the same webview,( so that the cookies are preserved) rather than in a browser. Do I have to create another activity for it ?
Is there any other way of navigation in phonegap, except those mentioned above ? Or is the only way of staying in the same webview is to dynamically load pages using ajax and replace the existing page with them ?
Another possibility is I can parse the session id from the response, store it in the local storage and append with every request. But this cookie is HTTP Read only, so I can't read it using javascript