user1152440
user1152440

Reputation: 905

Persistant Storage in HTML5 for Mobile Devices

I am developing a blackberry app through HTML5 Webworks and am looking for a way to persistanty store a series of strings. For example, assume I have a list of names

if I click on one of their names, I want to store them in a "favourites" section. So if I click on Anna, Bob and Fred I would like to persistently store them. Having turned the phone on and off, I would hope to see on the favourites section:

So far I apparently have two options: HTML5 localStorage API or the WebSQL Database.

1.) localStorage 2.) WebSQL Database

I'm very new to HTML5 and web development so I'm not sure which, if either, is the right choice to use in my case. I'm looking for something fairly simple to use as I'm not too competent yet on webworks. Does anyone know how to achieve what I'm trying to do? Thanks for any information.

Upvotes: 1

Views: 359

Answers (2)

Jeffrey Sweeney
Jeffrey Sweeney

Reputation: 6124

localStorage would probably work best in this situation. To my knowledge, it has more browser support, and it's far simpler to use.

You can learn more about it here:

http://hacks.mozilla.org/2009/06/localstorage/

Upvotes: 2

unludo
unludo

Reputation: 5016

This site may help you: http://caniuse.com/#index

It seems web storage is supported well: http://caniuse.com/#feat=namevalue-storage.

No mention of blackberry-webworks though.

Upvotes: 4

Related Questions