I have the following challenge: - I'm trying to save website data to local storage on end user systems. So that they can work while offline. I would furthermore like the local cache to be available for as long as possible. Like somehow handle/block ctrl-r and F5, so that the cache is not flushed. This because the users will be working in the field and will very likely not have access to the Internet.
I have looked at several options. Right now I'm debating with myself over using IndexedDB or the File API.
-Cons on the File API: It seems to be deprecated: http://lists.w3.org/Archives/Public/public-webapps/2014AprJun/0010.html
-Pros on the File API: Write to the filesystem instead of internal browser cache
-Cons on IndexedDB: Browser controlled cache
-Pros on IndexedDB: Still live. Nice key/value db.
I also tried LocalStorage in browsers. Read this: Storing Image Data for offline web application (client-side storage database) - especially the PouchDB thing is nice. But! If the user clears the cache before a sync can take place = data loss :-(
I'm hoping you can give me some good advice. I'm looking forward to hear from you.
Thank you very much. /Lars Bingchong