We're currently building a web app (Django, Ember), and we just found that most of our potential customers require sporadic offline access to the application.
What we need is not just "presenting" the app so user can navigate, caching stuff in the Manifest and so on (which I guess we will need eventually too), but we must let users actually operate as much as possible as if they were online. There will be obviously some features unavailable, but basic usage of the app should be available.
That said, I'd love to hear some thoughts on people that have confronted this scenario before. The way I see this, we need to:
1.- Either check if we're online / offline constantly or let the user specify when they're going offline (sort like Airplane mode in a smartphone).
2.- All data should be dumped into IndexedDB and from that moment on we use IndexedDB for anything related with data.
3.- When the user goes back online, a Synch process must try to dump the data from the offline user to the db online. While this might look dangerous, I don't expect a lot of users going offline at the same time while other online users are using the app, so I expect this synch process to don't become a real nightmare, also I don't expect to have race conditions.
Well, and there is obviously the option to create a Desktop standalone app...but I will try to avoid this as much as possible...
Thanks!
offline
andonline
events. These are fired when the device goes offline and comes back online. – Bufordbug