Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Support for Persistent Storage in Web Browsers #2937

Closed
3 tasks
lidel opened this issue Mar 22, 2020 · 2 comments
Closed
3 tasks

Support for Persistent Storage in Web Browsers #2937

lidel opened this issue Mar 22, 2020 · 2 comments
Assignees
Labels
env:Chrome env:Firefox kind/enhancement A net-new feature or improvement to an existing feature kind/maybe-in-helia

Comments

@lidel
Copy link
Member

lidel commented Mar 22, 2020

Context

Right now every js-ipfs repo created in web browser context is created in the default, "temporary" storage space provided by the browser.

This means:

  • there is no user prompt asking user to allow js-ipfs to store data (good UX)
  • data is stored in a space that is
    • shared with entire Origin (other JS code can eat up the quota)
    • silently GC'd if Origin or global storage hits browser-vendor-specfic limits

Motivation

This is usually ok, as data cached in js-ipfs is expected to "disappear" (as in: go offline) when user closes the tab and app developers add some middleware responsible for pinning/persisting user data anyway.

That being said, there should be a programmatic opt-in to use persistent storage in the browser, just in case someone really wants data to be around, or expect a lot of data to be downloaded by their web app and don't want it to get GC'd. Imagine a game / VR app which is using IPFS for asset storage etc.

Note on this being vendor-specific

Below are only initial notes.
Make sure to re-check before starting work, as vendors may have changed it.

What needs to happen?

  • document current behavior in Firefox, Chromium and Safari
  • design configuration option that would work everywhere
  • wire up configuration option to work in every supported browser and throw error otherwise

References

@magniff
Copy link

magniff commented Jun 4, 2021

Sup. Any progress on that one?

@SgtPooki
Copy link
Member

js-ipfs is being deprecated in favor of Helia. You can #4336 and read the migration guide.

Please feel to reopen with any comments by 2023-06-02. We will do a final pass on reopened issues afterward (see #4336).

I think this functionality would make the most sense as a UI plugin / extension of a datastore/blockstore implementation in Helia. Closing this issue, but pinging @achingbrain for awareness.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
env:Chrome env:Firefox kind/enhancement A net-new feature or improvement to an existing feature kind/maybe-in-helia
Projects
No open projects
Status: Done
Development

No branches or pull requests

3 participants