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

使用 IndexedDB 替代 localStorage #921

Open
2 tasks
Soltus opened this issue Jan 18, 2023 · 0 comments
Open
2 tasks

使用 IndexedDB 替代 localStorage #921

Soltus opened this issue Jan 18, 2023 · 0 comments
Assignees
Milestone

Comments

@Soltus
Copy link
Member

Soltus commented Jan 18, 2023

采用 localForage 库实现
使用 IndexedDB 并不能解决随机端口(多开空间)的同源问题,但是会带来以下优点:

  1. 更好的性能,异步操作(不会锁死浏览器)
  2. 更多的存储空间和数据类型(后续升级考虑)
  3. 更灵活的回调

在汐洛分支,按工作空间执行 “启动时导入初始化 IndexedDB ,退出时导出备份 IndexedDB ” 有效解决了随机端口同源限制导致的储存丢失问题

关联:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant