0

I'm trying to use HTML5 Application Cache to speed some things up on an iPhone webapp. It works great for storing images, css and JS, but the problem is that it also tries to store the HTML. I haven't been able to get it to ignore the html and stop storing it in the cache. From what I've read, I have to "whitelist" the files and directories that I want to load no matter what. I've tried listing the files I want cached explicitly, and I've tried adding a series of things under the "NETWORK:" heading. I've tried

*
/
/*
http://mysite.com
http://mysite.com/
http://mysite.com/*

None of them seem to work. Is there any way to ignore HTML files by MIME-Type or anything? Any advice would be appreciated.

Ryan

P.S. Of course, my site is not mysite.com..I just used that for simplicity.

2 Answers2

1

I've avoided this problem by NOT referencing a manifest in each page, instead I have the following within each page :

<iframe src="cache.htm"></iframe> - with styles to hide the iframe

inside cache.htm I have :

<!DOCTYPE html>
<html manifest="cache.manifest">
<head>
<meta charset="UTF-8">
<title>Main Cache Resource</title>
</head>
<body></body>
</html>
Ged Byrne
  • 21
  • 1
0

based on previous tests and discussions with people in the html5 "ecosystem", each html-page that specifies a manifest is automatically cached as well.

futtta
  • 5,917
  • 2
  • 21
  • 33
  • That's right. My idea is to add a dynamic timestamp parameter after each link you're having in your app. I haven't tried it myself yet, but will look into it, as I have the same question/problem as Ryan mentioned. – Mathias Conradt Oct 05 '11 at 11:06