I am dealing with a large application that needs to store a lot of meta data locally. Our size estimate right now is around 10 MB. Some HTML5 browsers have a 5 MB limit of the localstorage. Is there a more generic way of getting around the size problem without making user install some external DB (mongoDB etc..).
I also read that some browsers allow control on the size of localstorage, but not all. The solution needs to be cross-browser and the user should not have to do anything extra to make it work.
Could someone point me in the right direction?
I had a similar problem a while ago. I ended up using indexeddb. Except for safari all current desktop browsers support it ( http://caniuse.com/#feat=indexeddb ). Indexeddb gives you two apis: a synchronous and an asynchronous. The asynchronous api is the one most browser implement - which pretty fast ends up in a callback hell. In chrome and IE the indexeddb can even be used in webworkers (unfortunately not in FF). This way i was able to start the needed replication algorithm in the background.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.