开发者

HTML5 Cache Manifest in Mobile Safari

开发者 https://www.devze.com 2023-01-16 14:48 出处:网络
I\'ve setup an HTML file with a cache manifest, an HTML5 doc type, and verified the manifest file is returni开发者_如何学Pythonng the correct mime type. The file, however, does not cache and therefore

I've setup an HTML file with a cache manifest, an HTML5 doc type, and verified the manifest file is returni开发者_如何学Pythonng the correct mime type. The file, however, does not cache and therefore does not work in offline mode on Mobile Safari on the iPhone.

The simple HTML file is at the URL below.

http://www.joeldare.com/i/calories/new/index3.html

The manifest file is at

http://www.joeldare.com/i/calories/new/cache.manifest

What am I doing wrong here?


After a few hours of banging my head, I found the answer. If your manifest includes a file that does not exist, then Mobile Safari will try to fetch that file each time your app opens (because it's supposed to cache it). But, it doesn't have the missing file, so it gives an error about connectivity and closes the app.

0

精彩评论

暂无评论...
验证码 换一张
取 消