My application has a simple agenda. And for that I want to keep the information of the user's agenda in the client side - because I want to minimize the number of ajax requests to the server.
I'm using an array to store the hours and names of the activities the user has in the agenda. But the problem is that I need to keep the information alive between sessions, without having to ask the server. I tried to use localStorage but is seems kinda tricky, considering it only works with strings and I want an array. I also thought about keeping the information in a file that I would read when the application opens.
I'm confused about the best way to do this. Any ideas?
P.S. I found this http://blog.ecofic.com/?p=903 to deal with localStorage, but as I said, it seems kinda tricky to manipulate the data
P.S 2 I'm using jQuery, jQuery Mobile and PhoneGap :)
I'm having a problem with the back button that I'm trying to solve for some days and I don't find any answer on the web.
I'm building my pages dynamically: I have a index.html with two pages inside, the home page and another one that will have the dynamic content. I use the anchors href to access to my rails server, with pagebeforechange I make a request to the server so I can have access to the information I want and build the page.
This process works just fine but my back button is not working, he can change the URL but he can't load the previous page. The last option that I tried was to use the URL to reload the page with changePage, but I most be doing something wrong or maybe this isn't a good solution at all. I don't know...
Is there anyone to help me? :)amically Injecting Pages