iPhone and HTML5 Cache Manifest

Jamey McElveen picture Jamey McElveen · Nov 7, 2008 · Viewed 34.8k times · Source

I am trying to build an iPhone web application using ASP.NET. The page is dynamically rendered once for each visitor. At this point the page can be bookmarked and it will never change again for that visitor. For this reason it should be cached locally from that point on so the application will run if referenced from the bookmark even if no network connection is available. No matter what I try the phone continues to request the page from the server forcing a re-render or it fails if the phone is offline.

Louis Gerbarg suggested in this post that I use HTML5 Cache Manifest to get this working however following the w3.org docs does not appear to work for the iPhone. Does anyone have a good example where application cache is working?

Answer

Daniel picture Daniel · Mar 9, 2009

The cache manifest file has to be served with a 'text/cache-manifest' mime-type. This is absolutely critical, it will not work without it. If you navigate to the url of your manifest file, it should trigger a download...

Also, I've found that putting the manifest location in the tag as an absolute location, as well as all the entries in the manifest file to be more effective.