6

I'm having some major trouble with AppCache.

I've got a single page application (with real URLs using using Page.js and loading HTML from the server on page load, (dispatch: false)

It's running on Bode.js, in particular it's a Sails.js app.

I've got a manifest file in the HTML tag of the layout. The manifest file has been tested repeatedly and everything checks out. It works flawlessly in Chrome. Even in Safari, it shows up in the inspector correctly and has a list of the assets listed in the file. So far so good.

However, when offline, Safari fails to load anything but the HTML document itself. So I'm basically seeing just an unstyled list of headers. The console shows a bunch of 404s. So even though it's reading the manifest file correctly, it's not caching anything.

Firefox doesn't even detect the manifest file and just seems to working like it didn't exist.

Safari on iOS7 is behaving like Firefox and not showing anything, when offline.

Anyone with any bright ideas why this may be happening?

user7637745
  • 965
  • 2
  • 14
  • 27
Naman Goel
  • 1,525
  • 11
  • 16
  • my manifest file was called manifest.appcache, but the apple docs said it should be .manifest, so i changed the file name to cache.manifest. Both behave in exactly the same way in all browsers. I've triple checked the MIME type and it is correctly text/cache-manifest – Naman Goel Dec 18 '13 at 10:37
  • 1
    The plot thickens. I tried an appcache **demo** site: http://appcachefacts.info/demo/index.html And it has the exact same behaviour as my site. So more and more, i feel like i've not done anything wrong and the browsers are misbehaving. – Naman Goel Dec 18 '13 at 10:46
  • Can you show us your manifest file? – GemK Dec 18 '13 at 19:56
  • 1
    I'm having no problems in Firefox, but Safari in iOS is completely broken. Tested on an iPad and iPad mini. – Jelle De Loecker Dec 26 '13 at 10:50
  • @GemK Sorry, I got rid of the manifest file for now and dropped offline support. But trust me, my manifest file was pristine. Safari has some deep problems with app cache. – Naman Goel Jan 07 '14 at 21:20
  • Also I tried multiple app cache demos online, and they all have the same problem in Safari. The files just don't load offline. It seems Safari treats app cache in a very different way. It only uses to make page load faster and doesn't actually help with it being offline. – Naman Goel Jan 07 '14 at 21:23
  • Check all paths in manifest important! Check max size of yours file (5mb is max by default). Offline mode is problem , maybe your site in some reason have needs for network . – Nikola Lukic Mar 02 '16 at 12:54

0 Answers0