Skip to content
jeff-h edited this page May 1, 2014 · 1 revision

Desktop apps load immediately and work offline, whilst web apps have the advantage of being easily updated and remotely managed. MacGap gives you the best of both worlds via HTML5's offline APIs.

First you can define a refresh tag in index.html, which will immediately forward your WebView to a given address.

<meta http-equiv="refresh" content="0;url=http://example.com">

Then use HTML5 offline APIs to cache your application locally. The first time your application launches, it'll download all the remote resources for use offline. Then during subsequent launches the locally cached resources will be used, and the application will fully function offline. If your remote application changes, then the cache manifest will be updated and application re-cached.

Clone this wiki locally