mercredi 28 janvier 2015

Offline cache using manifest appcache

I am trying to make my application offline enabled. This is my starting page of the app which I have put on TOMCAT



<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://ift.tt/kTyqzh">
<html manifest="test.appcache">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
Hello World
</body>
</html>


And Here is my test.appcache (although I am not using any of the files mentioned in my manifest files at this point - its just a POC)



CACHE MANIFEST
#version 820

CACHE:
resources/test.js

NETWORK:
*

FALLBACK:
resources/img/pic.gif


test.html runs fine in online mode in localhost:8080/myapp/test.html


But when I stop the TOMCAT and try to run it this is what I get -


enter image description here


Why is my HTML page test.html not getting served from cache when I stop TOMCAT server!


Thanks


Aucun commentaire:

Enregistrer un commentaire