1

I have a simple html website containing one css and js doc and some images. I need to make this work offline.I use html 5 offline cache for this purpose. On deploying and browsing i see that the website doesnt cache.Console shows an error : Application Cache Error event: Manifest fetch failed (404)

Following are the details : Directory structure : enter image description here

Manifest file :

enter image description here

Whats wrong?

Community
  • 1
  • 1
Murali Uppangala
  • 884
  • 6
  • 22
  • 49

4 Answers4

1

The file name must be manifest.appcache ; it should not contain names of files other than images/javascript/css/html files. Any other types will result in error in fetching files. The rule applied to offline caching is ~ 'catch all or none'.

Murali Uppangala
  • 884
  • 6
  • 22
  • 49
0

If you are caching mobile data on iPhone, please check the filename since, according to Apple Docs it must be cache.manifest:

Storing Data on the Client

loretoparisi
  • 15,724
  • 11
  • 102
  • 146
0

It's already 2019 and I had the very same error message =)

For me renaming the file as manifest.appcache made it work.

In any case, digging further about this error, I found the AppCache API is deprecated (I'm new to these APIs, since I started studying about PWA recently) and no longer recommended (Use CacheStorage + ServiceWorkers instead) https://developer.mozilla.org/en-US/docs/Web/HTML/Using_the_application_cache

Hope this info can help others on the same path =)

Marco Arruda
  • 699
  • 6
  • 17
-1

Did you try example.manifest.php? instead of .txt?

  • In a Q&A format, when posting an answer, usually best to make a statement rather than ask a question. – Rob Feb 17 '15 at 09:30