0

I'm testing a data collection idea for places with spotty mobile connectivity.

I'm working on the technology test here

I have the call to the manifest file in the HTML tag: <html manifest="/manifest.appcache">

Here is the manifest file

CACHE MANIFEST
# 2013-06-26

CACHE:
backbonedual.js
backbonedual.html

NETWORK:
*

FALLBACK:

Finally, I have an .htaccess file in the same folder:

AddType text/cache-manifest .appcache

And I've tested that, since when I load the manifest file directly, the network section in the Chrome developer tools is telling me the correct MIME type.

But still, it doesn't work. And no resources are showing up as listed in: chrome://appcache-internals/.

Jesse
  • 388
  • 6
  • 16
  • I tested this on Firefox and it worked. It still doesn't work on Chrome. Is there something weird with Chrome? – Jesse Jun 27 '13 at 15:42

2 Answers2

1

I looked at your application and I think the problem is in the manifest file. When you specify the files to cache you don't write the whole path. The files are located in the folder backbonetest and that need to be specified as well.

Rewriting your manifest file in the following way should work

CACHE MANIFEST
# 2013-06-26

CACHE:
backbonetest/backbonedual.js
backbonetest/backbonedual.html

NETWORK:
*

FALLBACK:
Ohlin
  • 4,068
  • 2
  • 29
  • 35
  • That was a good idea. But it's still not working as expected. =/ – Jesse Jun 27 '13 at 12:59
  • I just realised you also have to change the path to the manifest...assuming the manifest file is in the `backbonetest` folder as well. The `HTML` tag should then be `` – Ohlin Jun 27 '13 at 13:17
  • Or you could write `` and just skip the path completely... – Ohlin Jun 27 '13 at 13:19
1

I decided to start with a working example. A very simple hello world. I created a cache manifest for it and it worked just fine.

Then I decided to slowly add elements from my other page to see which part breaks it.

And I only got to the first line.

<meta charset="utf-8" />

When I removed this line the application cache was working! Does anyone know why?

Jesse
  • 388
  • 6
  • 16
  • Where did you put the meta tag? When I use the same meta tag it works fine in Chrome. – Ohlin Jun 28 '13 at 06:17
  • If you update your question with the upper part of your html code, including the lines with manifest attribute and meta tag, it might be easier to test it. – Ohlin Jun 28 '13 at 06:19
  • I saw the link to your project and found it there. – Ohlin Jun 28 '13 at 06:24
  • The meta tag was outside the html tag. I think that was the issue. Firefox didn't have a problem with it, but Chrome did. – Jesse Jun 28 '13 at 19:26