I have created a single page website that is designed to be installed on the iOS home screen and accessed as a standalone web app. It's a single page and a cache.manifest ensures that the related assets are cached offline.
After a lot of ups and downs the whole thing now seems to work on and offline. However there's one issue that confuses me. Only when I start the page from the home screen, some assets that aren't cached are not retrieved from the web, even though there is a connection. I have an offline fallback for these assets, but I only expect the fallback to kick in when there is no available connection.
My cache.manifest looks like this:
CACHE MANIFEST
# 2013-01-28:v2
# Explicitly cached 'master entries'.
CACHE:
gfx/logo.png
styles/default.css
scripts/default.js
(...lots of other assets...)
gfx/slide.jpg
# Resources that require the user to be online.
NETWORK:
*
# Fallback when offline.
FALLBACK:
content/slides/ gfx/slide.jpg
The images in the content/slides/
directory are not cached. If there is no connection I want each image to be replaced with gfx/slide.jpg
which is cached and this works. When there is a connected, I expected that the NETWORK: *
directive would ensure that images from the content/slides/ directory would be retrieved from the web, but that doesn't happen.
Is there anything I need to change in the manifest file to indicate that images from content/slides should be retrieved from the web before they fall back to using gfx/slide.jpg?
Has anyone else experienced getting stuck in the fallback rule even when the page is accessed later on with an available internet connection?