The manifestFile property and online apps

In Project Properties, there is a property named ‘manifestFile’. The setting of this property can have a big effect on how your app works, online and offline.

The default setting is appcache. This causes AppStudio to collect the names of the files in your project and put them in a special file called OfflineApp.appcache. When your app is downloaded to a device, this file is checked by the browser. The files named are stored in the browser’s persistent storage on the device. This allows your app to run even without an internet connection, since all the files needed are present.

Each time a cached app is started, the browser checks to see if the OfflineApp.appcache file has been updated on the server: if so, the new version of the app is downloaded. If it can’t reach the server (perhaps because the device is offline), it does nothing and runs normally.

If the OfflineApp.appcache file has been deleted on the server, the app is deleted from the device.

The manifestFile property can also be set to no caching. The OfflineApp.appcache file won’t be created, and the app will not work in offline mode. It’s worth doing if your app will only work if the device is online: for example, if it has a lot of Ajax calls which are necessary for operation. A side benefit is that you won’t get any “Cache Error” messages.

If you change an app from appcache to no caching, be sure to clear your browser’s cache. Otherwise, it will still think it’s a cached app.

The final choice for this setting is manifest. It’s an obsolete setting. When the standard was first set, it specified .manifest as the ending for the file. Microsoft pointed out that it already was using .manifest for something else. Oops. The standard was revised to call it .appcache instead. Some early AppStudio projects were created in the .manifest days – changing the file suffix now could cause cache errors.