Reputation: 367
I'm building a web app using jquery mobile that will have lots of images that need to be cached for offline access, and I'm looking for the best way to accomplish this.
I originally was just going to create a cache manifest file for the images, but there are too many, and they exceed the size limit. I also considered Indexeddb, but it doesn't seem to have much support yet.
The solution needs to work for both Android and iOS and also be accessible in a web browser. Total storage capacity will probably need to be around 15-20 MB. Is there a good option for this?
Also, I don't have much experience with web apps, so any examples you could provide would be great.
Upvotes: 1
Views: 866
Reputation: 1068
The web sql database (sqlite) will give you 50MB local storage and works in Android and iOS http://www.html5rocks.com/en/features/storage There is a nice library that simplifies access to sqlite here https://github.com/jhubert/javascript-sqlite
Upvotes: 1
Reputation: 16953
I don't think there is any good solution for this. Even if you use and combine multiple storage methods (including the standard browser cache) you still won't get near to 15MB.
I fear this is going to come down to a choice between a dedicated app, and not storing the images locally.
Upvotes: 1