Sorry to revive an old thread,
but this is one of the top search results on Google for Meteor.js offline support, so I think it it relevant to post here.
It seems Meteor has everything we need except for minimongo being cleared on refresh.
Maybe the only thing we need is a simple boolean option for minimongo to persist locally (with a way to clear cache for certain collections, or maybe persist only for certain collections, etc).
Other than that, Meteor.methods need to be loaded on both server and client for the “optimistic UI” (which means the client can change the data locally before syncing to the server, but that also implies that if we are offline, the local data will be updated and the UI will update, and the server will sync later once online).
At the very least the methods that have the logic to update collections for the UI should be imported on both sides for this to work smoothly with default Meteor features. Methods for online-only can have placeholder methods on client.
If your server methods are visible in public, you’ll probably end up with the best security (if not careful, someone will first exploit you). Just be careful. Nothing wrong with showing code publicly if it is actually secure.
So the real question this boils down to is: how do we persist minimongo over refreshes?
Some options:
I think it would be great for Meteor to make persistence an built-in option for it’s collections, but even so it isn’t difficult to implement the persistence part (just look at the size of those packages) or to just use a package. Means it is also easy to add this to Meteor core.