Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Unfortunately local storage is limited by 5MB. It's probably enough for simple apps, but will it work with any real world projects?


Good 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.


The 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).


WebSQL 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.


That'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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: