Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Localstorage package with async api for better mobile support #1860

raix opened this Issue · 3 comments

3 participants

Morten N.O. Nørgaard Henriksen alan blount Nick Martin
Morten N.O. Nørgaard Henriksen

Could we please use something like instead of the localstorage package - and have accounts use the async api?

I've made a couple of packages making Meteor run on chrome mobile packaged apps / phonegap / cordova / Firefox OS / node webkit etc. Most of these break when it comes to accounts - since accounts relies on the sync version of localstorage.

Why: localstorage blocks

Morten N.O. Nørgaard Henriksen raix referenced this issue in SpaceCapsule/Meteor-cordova

Does this work with meteor + cordova v3.3.x ? #15

alan blount

i'm interested in this as well... be careful with this, "meteor+mobile=awesome"

Nick Martin

This is interesting. Sounds like a cool feature to add someday.

A start might be a localforage package on atmosphere.

Closing as a feature request.

Nick Martin n1mmy closed this
alan blount

crossposting for reference, see issue #2643

In more research on this, I've heard that localStorage may be un-reliable on cordova (the OS can clear localStorage) and it looks like many people complain about localStorage in general.

But it's certainly the only way (currently) that Meteor stores the login token... see here:

I'm now looking at localForage
Offline storage, improved. Wraps IndexedDB, WebSQL, or localStorage using a simple but powerful API.
Already packaged by good ole' @raix here:

Now, I wonder if I can override Meteor._localStorage...

and then from: Morten

@zeroasterisk look at ground:store instead, its tailored meteor, localforage is the inspiration, but the groud:store is more meteor like. (Im using this in ground:db since neither meteor.localstorage nor localforage felt/worked ) it allows local async storage adapters. At the moment ive only written the localstorage adapter, but an adapter for cordova filesystem is to come (we also need this stuff on the CollectionFS project for client side storage)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.