OfficeDev / script-lab

Create, run and share your code directly from Office
MIT License
704 stars 162 forks source link

Consider moving to IndexedDB to have more storage space #553

Open Zlatkovsky opened 5 years ago

Zlatkovsky commented 5 years ago

LocalStorage caps out at 5mb or 10mb on most browsers -- whereas IndexeDB can store up to a gig!

https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API

Also per the link above, there are simpler wrappers around the IndexedDB API.

Note: IndexedDB API is powerful, but may seem too complicated for simple cases. If you'd prefer a simple API, try libraries such as localForage, dexie.js, ZangoDB, PouchDB, and JsStore that make IndexedDB more programmer-friendly.

Zlatkovsky commented 5 years ago

Putting it into "near future", though it might be a little on the longer-term side of that bucket.

wandyezj commented 7 months ago

It would be preferable to use indexedDB it's tricky to swap over now because indexedDB requires async calls.

This would avoid the issues we have seen when people have too much in their local storage.