[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support session storage backend #1501

Open
juntyr opened this issue Oct 16, 2024 · 2 comments
Open

Support session storage backend #1501

juntyr opened this issue Oct 16, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@juntyr
Copy link
juntyr commented Oct 16, 2024

Problem

When hosting a JupyterLite page, there is a balance between avoiding user data loss (by having a persistent storage backend) and not having independent sessions interfere (a fresh window is opened and e.g. litegitpuller pulls in a different repo). There is a niche where different sessions should get fresh storage contexts, but within the same session some level of persistence is provided.

Proposed Solution

In addition to the local storage backend, provide access to the session storage backend. This backend is identical in functionality but limited to a single tab. Refreshing the tab persists the data, creating a new tab provides a fresh storage context.

@juntyr juntyr added the enhancement New feature or request label Oct 16, 2024
@jtpio
Copy link
Member
jtpio commented Oct 16, 2024

@juntyr could drives help with this use case? For example the default drive persists data in memory, which is lost on page reload. But an additional drive would persist data on a storage backend? Similar to what jupyterlab-github would do, but with actual write access.

creating a new tab

What does creating a new tab mean in this context?

@juntyr
Copy link
Author
juntyr commented Oct 16, 2024

( I'm still a bit cautious about additional drives ever since I had to disable the GitHub one because it disallowed creating new notebooks ... )

Anyways, I was thinking as an alternative for the existing options here: https://jupyterlite.readthedocs.io/en/stable/howto/configure/storage.html#local-storage-drivers

Whereas localStorage is only connected to the site origin, and so even different tabs share the same storage, sessionStorage is unique per browser tab (so if I open the same site twice I will get two separate stores, but if I reload one of them it keeps the data). Does that clarify it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants