4 ms·
Really you'd want to do this in to an indexeddb store rather than local storage. Less issues with size limits and string serialisation as you can chuck Blob ins
by tehbeard 6y ago
Really you'd want to do this in to an indexeddb store rather than local storage. Less issues with size limits and string serialisation as you can chuck Blob instances straight into it.
You'd have to handle loading/saving though
- kpkrish 6y agoIs there some way by which the indexedDB store can stay synchronised with the server database running in the backend. Something simple so that the front-end app developer can just focus on implementing business requirements.
- tehbeard 6y agoindexedDB is too low level for that kind of thing by itself. It's just a fast Key-Value store with secondary indexes that's in your browser. You either need to find a solution that has a sync system built in (such as <https://dexie.org/ https://dexie.org/> or <https://pouchdb.com/ https://pouchdb.com/> ) or you'd roll your own atop whatever you were using.