方案/库 | 文档 | 简介 |
cookie | MDN | 一个键值对形式的字符串 |
IndexedDB | MDN | IndexedDB 是一种底层 API,用于在客户端存储大量的结构化数据(也包括文件/二进制大型对象(blobs)) |
sessionStorage | MDN | 数据在页面会话结束时会被清除 |
localStorage | MDN | 存储的数据没有过期时间设置 |
localforage | 官网 | localForage is a JavaScript library that improves the offline experience of your web app by using an asynchronous data store with a simple, localStorage-like API. |
Dexie.js | 官网 | A Minimalistic Wrapper for IndexedDB |
PouchDB | 官网 | PouchDB is an open-source JavaScript database inspired by Apache CouchDB that is designed to run well within the browser. |
idb | npmjs、github | IndexedDB, but with promises |
IDB-Keyval | npmjs、github | A super-simple-small promise-based keyval store implemented with IndexedDB |
JsStore | 官网、github | JsStore is an IndexedDB Wrapper. It makes IndexedDB super easy with its SQL like apis. |
Lovefield | 官网、github | Lovefield is a relational database for web apps. |