Refreshing iOS Home Screen web applications

In iOS Safari you can add web applications to the Home Screen (Add to Home Screen). When you open the web application by selecting the icon placed on you Home Screen, Safari will try to use cached resources to display the web application. To control this caching you need to understand the Html 5 application cache.

Html 5 apps can specify which resources can be cached on the client to enable offline usage of the web application. You do this using the cache manifest file. This is a text file, served with the mime-type text/cache-manifest. The filename usually has the extension .appcache. A Beginner’s Guide to Using the Application Cache and Appcache Facts contain some good information on using the application cache.

Anyway, if you want to force a web application opened from your ipad or iphone home screen to reload the cached resources, you need to use an appcache manifest. Safari will only reload resources when you modify the manifest file. Easiest way to do this is by adding a version comment in you manifest file. Here is part of the manifest file i use for my html5/svg presentation tool:

# cache version 14

blog comments powered by Disqus