3 ms·
Unfortunately local storage is limited by 5MB. It's probably enough for simple apps, but will it work with any real world projects?
by imaginenore 11y ago
Unfortunately local storage is limited by 5MB. It's probably enough for simple apps, but will it work with any real world projects?
- gkop 11y agoGood point. The behavior documented in the videos (refreshing the page) could make use of session storage as well as local storage, which might buy a bit more space. But unlike local storage, session storage is not shared across tabs/windows nor persisted over browser restarts. So session storage isn't really useful for the bigger problem.
- bahmutov 11y agoThe app saves its state in whatever form it wants. The demo saves it in localStorage that is very limited. One really should look at something better like IndexedDB or WebSql (or something that hides the technical details, like localForage or PouchDB).
- imaginenore 11y agoWebSQL is not supported by IE nor FF, and is limited by 50 MB. IndexedDB is limited by same 50MB, 5MB on mobile, and is only partially supported by IE, Safari and iOS.
- bahmutov 11y agoThat's why I recommend using PouchDB to work with whatever API is available. Storage limits are harder to work around, but if your HTML snapshot weights more than 50MB (or even 1MB!) that it is a problem by itself.