GMOD / jbrowse-components

Source code for JBrowse 2, a modern React-based genome browser
https://jbrowse.org/jb2
Apache License 2.0
208 stars 62 forks source link

Try using localForage library for storing e.g. session data #3575

Open cmdcolin opened 1 year ago

cmdcolin commented 1 year ago

The localStorage has some hard limits that we can exceed if we click on e.g. a large BAM feature, since this is stored in the session and serialized to string

The indexedDB API offers significantly more local storage, but is quite a different API, but helpfully this library "localForage" is a localStorage-almost-compatible API

Only thing is that it's async instead of sync, but then you get significantly more storage

https://github.com/localForage/localForage

cmdcolin commented 1 year ago

not really related but maybe interesting: safari is very aggressive about removing local storage stuff "7-Day Cap on All Script-Writeable Storage"

https://webkit.org/blog/10218/full-third-party-cookie-blocking-and-more/