Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

phonegap jquerymobile sessions

I want to develop a system that will actually use sessions on jQuery mobile, how can I use sessions? Can I for example create something like, a cookie, and it will connect with jquery ajax requests to the server to set and get session data? How are people doing this? Any advises?

like image 981
randomKek Avatar asked Dec 02 '11 02:12

randomKek


Video Answer


1 Answers

You can use the cookie plugin http://plugins.jquery.com/project/cookie it´s very easy to use.

It´s not necesary to send the cookie to a remote server, for example, if you create a cookie in Blackberry and then close the app, when you re open the app the coockie will remain existing. So, in Phonegap, for some plataforms you must code the way or activitie to delete the cookie.

EDIT 1: the plugin site on jquery is unavailable right now, so i upload the cookie plugin to jbin http://jsbin.com/umiwub/2 (delete the html part)

Good Luck!

like image 151
Mariano Montañez Ureta Avatar answered Sep 22 '22 02:09

Mariano Montañez Ureta