meteor/meteor — pull request #1457 by raix (2013-09-29 15:36:19+00:00)
Title: Added runtime appcache

*This pr is more for discussion pro/con - It might not be for the more common use case*

Added hook for adding runtime files / bundles to the appcache - this could be files for lazyloading but:

-
The real reason:
[We are working](https://groups.google.com/forum/#!topic/meteor-talk/wxBfhJw0oVk) on improving the way cordova and meteor works together.
We want to use Meteor as a remote url in cordova so the Meteor server
has to serve device specific bundles to cordova.
Sometimes we have to serve sensitive information like the android push
api key - but at the moment the cordova uses the native webkit, so we
cannot determin if actually in cordova or just in the native browser.

-
Solution:
adding a querystring eg. `?cordova=3.0.0` would solve things but also
complicate stuff

I've built a runtime bundler allowing packages and the app to bundle
Assets depending on userAgent and querystring. [Link](https://github.com/raix/Meteor-runtime/blob/master/README.md#usage)

Now when on mobile its vital to be able to use the appcache - so this
code adds a hook for adding runtime bundles in the appcache while
preserving the querystring - unless hash is forced

-
Kind regards Morten