1

I just created a web app available offline with the cache manifest etc. It works pretty well but I want to access to some pictures that are NOT mentioned in the cache manifest and they simply don't appear when I'm online.

Moreover, is there any simple way to load a default image instead when the app is offline?

Thanks in advance!

EDIT: the path of these pictures is dynamically loaded from a separate web service and saved in the local storage.

RE-EDIT:

OK I found the solution:

just add the following lines to the cache manifest:

NETWORK:

*

That will allow the web app to access every elements that are not in the CACHE: section of the manifest file. Actually the access is blocked if there's no NETWORK: section.

source : http://ajax.sys-con.com/node/1643966/mobile

Alexis
  • 16,629
  • 17
  • 62
  • 107

1 Answers1

1

I'd like to confirm your solution. We were having irratic problems with our AJAX calls when online using an app with a manifest. This was true for Firefox AND iOS Safari. The Ajax calls were sometimes returning status 0 errors. It was very inconsistent. We added

NETWORK:
*

to our manifest and the problem went away. The spec would suggest that anything that is not in the CACHE: section of the manifest is not cached but it would appear that the NETWORK: section is always needed if there are non-cache resources needed.

sjngm
  • 12,423
  • 14
  • 84
  • 114
velohomme
  • 136
  • 2
  • 9