meteor Offline Apps



The first thing to do when taking your Meteor app offline is to create some visual indication of whether the local client app is connected to the server or not. There are lots of ways to do this, but the simplest way is to probably do something like this:

Template.registerHelper('getOnlineStatus', function(){
  return Meteor.status().status;

Template.registerHelper('getOnlineColor', function(){
  if(Meteor.status().status === "connected"){
    return "green";
    return "orange";
  <div id="onlineStatus" class="{{getOnlineColor}}">
  color: green;
  color: orange;

Enable Appcache

One of the easier steps is adding the appcache. Appcache will allow your application content to load even when there is no internet access. You won't be able to get any data from your mongo servers, but the static content and assets will be available offline.

meteor add appcache

Enable GroundDB

Finally, we want to get some of our dynamic data to be stored offline.

meteor add ground:db
Lists = new Meteor.Collection("lists");

Todos = new Meteor.Collection("todos")

Things to Be Careful Of

  • The appcache will cause some confusion in your development workflow, because it hides Meteor's auto-updating features. When you turn off the server component of your app, the client portion in your browser will continue working. This is a good thing! But, you don't get the immediate feedback that your app has been turned off, or that there have been updates.
  • Try using Chrome's Incognito Mode when developing your app, because it doesn't use appcache.
  • GroundDB doesn't work particularly well with IronRouter.