I am trying to implement offline use through appcache with the site corvallistrails.org. All of the images and resources that I am hosting cache perfectly, but when I attempt to use the site the map tiles from opencyclemap.org fail to load. They are not specified in the .appcache file. I have added the entries *, http:/*, https://*, *.opencyclemap.org/*, and opencyclemap.org/* under NETWORK: to no avail. My research has turned up nothing. I simply want to force the browser to load the map tiles through the network every time. What kind of entry to I put in the manifest to produce such a result?

1 Answer
1

CACHE section ask that resources will be cached, you must put there all cached resources and can't use * pattern, because browser can't resolve that resources it must download. There you can set resources to another domain as http://tile.example.com/zoom/x/y.png.

FALLBACK section ask that resources must be mapped to another when application offline, you can set there only self host resorces.

If you want make map offline you must put all need tiles to CACHE section, but it's very match tiles and take a lot time for download all (thousands tiles and 20-50 Mb for million city). Likely to you can't use localStorage because it have little size (5 Mb without subdomians and iframes hacks). I made test offline with IndexedDB and Web SQL: https://github.com/tbicr/OfflineMap, but there are not optimal storage implementation.

To clarify: At this point in time, I do not want to cache the map tiles. I do want to cache everything else. Here is my manifest file: pastebin.com/USLq0tX3. When I use this configuration, the map tiles fail to load over the network connection when it is available.
– user2669459Aug 10 '13 at 7:14

Oh, sorry for misunderstanding. This is very strange behaviour for tiles loading if them available on direct access. Can you publis example on public access (github pages for example)?
– tbicrAug 10 '13 at 18:31

Try beta.corvallistrails.org. It works until I allow offline caching and then clear the regular cache, then all the tiles vanish.
– user2669459Aug 11 '13 at 1:18

I got it. Look like tiles can't be loaded. I check request with wireshark and not found real requests to tiles server (only manifest checking).
– tbicrAug 11 '13 at 8:40

This problem simply reproduced (page with <img src="tile url"> and empty manifest CACHE MANIFEST), but when I add NETWORK: * - all work fine. Did you try explicit setup NETWOR and CACHE sections?
– tbicrAug 11 '13 at 8:56