vik-y
vik-y

Reputation: 469

Session Management on Mobile HTML5 application

I am working on an app using html5, javascript and jquery in the front-end and PHP in the back-end. I am returning all the data to the front-end in form of json.

I have to port this entire front end to a android application using phonegap

The problem I am facing is this:
In the web environment, the cookies are stored on the client side automatically using PHP which helps in managing the sessions. How can I manage sessions in my phonegap application?
Can I store cookies like I can do on a website? If yes, then how? if No, then what's the alternative?

Upvotes: 1

Views: 340

Answers (1)

Asanka Indrajith
Asanka Indrajith

Reputation: 353

For Android I guess you can. but as iOS strongly discourage cookies, I think you would better off with HTML5 LocalStorage and Sessionstorage.

http://docs.phonegap.com/en/edge/cordova_storage_storage.md.html

Upvotes: 2

Related Questions