I am trying to use offline caching of html5. But problem is it is caching all html files and not the ones I mentioned in cache manifest file:
For ex: I have 4 html files: index.html, test.html, sample.html, fallback.html and I have sample.appcache manifest file that contains:
CACHE MANIFEST
index.html
sample.html
NETWORK:
test.html
FALLBACK:
/ /fallback.html
I dont have manifest="sample.appcache" attribute set in any html file. I am using JBoss 5 AS and in web.xml I added mime mappings as follows:
<mime-mapping>
<extension>appcache</extension>
<mime-type>text/cache-manifest</mime-type>
</mime-mapping>
So only index.html and sample.html needs to be cached offline but test.html is also getting cached if it was hit earlier when server was up. The fallback.html is not getting called when server is stopped in place of this test.html
What is wrong with this setup?
Second thing I did not understand is on IE(v9) and Firefox(v19) I don't have to set mime-mappings but for application to work on chrome(v26) and safari(v5.1.7) this setting is indeed mandatory.