0

I have a couple of questions about offline storage in HTML5. It's not an area I am that familiar with so I was hoping someone could shed some light.

I want to develop a web based system (for mobile) that a user could potentially use offline. Obviously the first time they'd use it (and any time they need to sync data thereafter), internet access would need to be required.

  • Some text data would need to be downloaded in json format. Basically this will be a list of certain items that will appear in auto-complete forms in the app (ie. even if the user is offline and they want to enter a type of animal for example, they'd type in "Gir" and "Giraffe", being one of the items downloaded in that json list, would appear in the auto-complete box.

  • I would like the user to be able to take photos at certain points. This would need to be saved internally, such that when internet access is available it can be synced/uploaded to some web server.

Could someone tell me if what I am thinking of is achievable?

Thanks

b85411
  • 9,420
  • 15
  • 65
  • 119

1 Answers1

1

Use a cache manifest to keep offline portions of your app cached. You can also store key/value data in Local Storage, including text and blobs (which you should be able to convert to photos).

This demo (and its documentation) may be a useful resource for offline photo storage.

Nick McCurdy
  • 17,658
  • 5
  • 50
  • 82
  • Thanks. How difficult is it to actually take a photo on the phone using the camera, and then store that photo in local storage? And then retrieve it and upload to a server once the internet connection is restored? – b85411 Jan 09 '15 at 03:12