6
votes

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?

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
The plot thickens. I tried an appcache demo site: 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
Can you show us your manifest file? - GemK
I'm having no problems in Firefox, but Safari in iOS is completely broken. Tested on an iPad and iPad mini. - skerit
@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