0

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://www.w3.org/TR/html4/loose.dtd">
<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 821

CACHE:
test.html
/resources/test.js

NETWORK:
*

FALLBACK:
test.html

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

Tintin
  • 2,853
  • 6
  • 42
  • 74

1 Answers1

0

Try changing the doctype of your HTML doc to

<DOCTYPE html>

the manifest attribute is HTML5. https://developer.mozilla.org/en-US/docs/Web/HTML/Using_the_application_cache

Ivo
  • 535
  • 2
  • 13