You could use this library: https://github.com/mozilla-b2g/gaia/blob/master/shared/js/async_storage.js

The localStorage API should be avoided, it's bad for performance reasons. I don't know why we're advising against it but at the same time some of our reference apps for Firefox OS are using it.

On 10/03/2013 03:48 AM, [email protected] wrote:


Date: Thu, 3 Oct 2013 11:47:40 +0100 (BST)
From: jose llopis <[email protected]>
To: Mozilla <[email protected]>
Subject: [b2g] storage questions
Message-ID:
        <[email protected]>
Content-Type: text/plain; charset=iso-8859-1

I'm developing a messaging app which push service is already working :)


i need to store locally information of contacts that are logged to my service 
(this one i'm doing with localstorage but looking for a heavier storage 
alternative)

and a list of their messages per conversation (don't know how to organize this 
for storing as a list of objects...any idea?)


considereing that localstorage max size is 5mb my question is if there is any 
alternative to localstorage?
indexedDB seems too complicated to implement a relational system between users 
and messages

also i'd like to know how i could manage notifications to show the number of 
messages from a n number of conversations that i've received
since my code is
socket.on("notification",function(data){
??? // my actions to save messages for chat
?? // createNotification or put into chat box

});


thanks in advance people

_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to