Wener Notes

WebStorage

约 2 分钟阅读

存储限制

namelimit
sessionStorage5 MB
localStorage5 MB
Cookie4 KB
Cookie kv1 KB
IndexedDB10 MB - 2GB
  • 不同浏览器限制不同,这里列举 安全/常见值

Performance

store10000
localStorage110ms
IndexedDB1500-2200ms

IndexedDB 很慢

Library

  • dexie笔记dexiedexie/Dexie.js · Apache-2.0, JS, TS · A Minimalistic Wrapper for IndexedDB · dexie-react-hooks · useLiveQuery>) · 会 observe 数据变化打开:/notes/web/script/lib/dexie
    • IndexedDB 存储
    • 支持同步 - 但不是开箱即用
    • ~82kB/26kB - 无依赖
  • rxdbGitHubpubkey/rxdbrxdb · Apache-2.0, Typescript · offline first · 有 schema · 支持 punchdb, lokijs, dexie 存储 · 默认支持 REST 和 GraphQL 同步 · 使用 punchdb 也可以用 CouchDB 的同步笔记:RxDB
    • Apache-2.0, Typescript
    • offline first
    • 有 schema
    • 支持 punchdb, lokijs, dexie 存储
    • 默认支持 REST 和 GraphQL 同步
    • 使用 punchdb 也可以用 CouchDB 的同步
    • Premium: IndexedDB, SQLite, Sharding, Query Optimizer
    • ~114kB/31kB
      • binary-decision-diagram
      • broadcast-channel
      • event-reduce-js
      • spark-md5
      • object-path
      • clone
    • rxdb.info/nodejs-database.html
  • clientdb/clientdbGitHubclientdb/clientdb
    • Apache-2.0, Typescript
    • in-memory database, realtime
  • PouchDB
    • CouchDB replication
    • 支持 attachments
    • ~117kB/37kB
      • uuid
      • spark-md5
  • techfort/LokiJSGitHubtechfort/LokiJS
    • in-memory database
  • YousefED/SyncedStoreGitHubYousefED/SyncedStore
    • 基于 yjs 同步
    • 构建协作应用
  • localForge
    • 类似 localStorage
    • 异步
    • 支持多后端
  • Nozbe/WatermelonDBGitHubNozbe/WatermelonDB
    • 定位是 DB - 使用 class+decorator 定义 模型
    • React - LokiJS
    • React Native - SQLite
    • ~155kB - 基于 rxjs
  • Absurd-SQL
    • indexeddb
  • SQLite
    • empscripten Filesystem API
  • DuckDB WASM
  • Supabase
  • RethinkDB
    • Horizon
  • NeDB
    • Node.js, nw.js, Electron, Browser
    • MongoDB 查询语法
    • 项目停止
  • amark/gunGitHubamark/gunamark/gun · http://gun.js.org/ · 实时 · 分布式 - 点对点 · 离线优先 · 图 · CRDT · 相关技术 · AXE - Advanced eXchange Equation · P2P 网络层 · DAM - Daisy-chain Ad-hoc Mesh-network笔记:GunDB
    • syncing decentralized graph data
  • isaacs/node-lru-cacheGitHubisaacs/node-lru-cache
  • typicode/lowdbGitHubtypicode/lowdb
    • MIT, JS
    • Simple and fast JSON database
    • 支持 nodejs、browser、memory
  • FrigadeHQ/remote-storageGitHubFrigadeHQ/remote-storage
    • 非常简单的 remoteStorage 实现
    • GET/PUT/DELETE https://api.remote.storage/entities/{key}
    • Header
      • x-remote-storage-instance-id
      • x-remote-storage-user-id

关联信息

反向链接、本文链接的其他页面和外部资料。

站内链接

  • dexie
    笔记 · dexie

    dexie/Dexie.js · Apache-2.0, JS, TS · A Minimalistic Wrapper for IndexedDB · dexie-react-hooks · useLiveQuery>) · 会 observe 数据变化

References

GitHub9 条
其他外链15 条
最近更新commit f7c7613Edit

On this page