4

Well, adding it will be no problem, but how can I generate the cache manifest? I would need to somehow get the paths to the combined CSS and JS that Meteor generates. http://www.whatwg.org/specs/web-apps/current-work/#manifests

Mattias Petter Johansson
  • 1,064
  • 1
  • 15
  • 32

2 Answers2

4

Update:

As user1506145 said:

meteor add appcache

https://atmospherejs.com/meteor/appcache

This answer is out of date:

The answer lies in the bundler package, I autogenerated a manifest file there. You can get a full list of css and js files by hooking into: bundle.css and bundle.js.client

Once you have managed to get them a manifest file you will need to do the following with a manifestcontent var you have generated (dont forget to exclude from caching all the meteor urls needed):

buffer.files.client_cacheable['manifest.appcache'] = new Buffer(manifestcontent);

This will have your application serving the appcache file. Then you can edit /app/lib/app.html.in to add the reference in.

My issue when I did this was that I wasn't able to stale the cache often enough so it ended up with an application messed up on reload from the server.

jonathanKingston
  • 1,418
  • 10
  • 16
2

You may automatically generate and include the manifest by adding the appcache package.

meteor add appcache

https://atmospherejs.com/meteor/appcache

user1506145
  • 5,176
  • 11
  • 46
  • 75