applicationCache-based shell for loading Ember apps
MIT License
This is an ember-cli-deploy plugin that loads your Ember application
via an applicationCache
-based shell. It
This app has a working deploy setup for running out of s3, complete with "lightning deploy"-style activation.
https://github.com/ef4/ember-appcache-demo
Running version is here:
http://appcache-demo.eaf4.com/
Set autoRun: false
in the arguments to new EmberApp
in your ember-cli-build.js
file. Our bootloader code takes over deciding when to boot your app.
Remove loader.js
from your package.json, and set _ignoreMissingLoader: true
in the arguments to new EmberApp
in your ember-cli-build.js
file. This addon inlines its own copy of loader.js
in order to manage ambiguity between multiple versions of your app that may be attempting to load in parallel.
Wherever you are deploying index.html
, you must also deploy appshell.html
and appcache.manifest
.
Make sure you're using fingerprinted assets. This is critical to busting through the application cache to get instant updates when online.
It's a nearly-identical copy of your index.html, with one key difference: it lacks a manifest
attribute, so it doesn't get stored in applicationCache
. We use it to bust through the cache when we want to check for the latest index. If we find a new index, we shove it into DOM and let it take over immediately, while the normal applicationCache
update is happening in the background.