同步存储和异步存储_如何使用localForage进行简单异步浏览器存储

同步存储和异步存储

localForage is a convenient wrapper library that smoothes the rough landscape of browser databases. Of which there are several:

localForage是一个方便的包装库, 可简化浏览器数据库的概况 。 其中有几个:

  • localStorage

    本地存储

  • IndexedDB

    索引数据库

  • and Web SQL

    和Web SQL

Each of these options was initially designed with the same purpose: providing persistent storage in the browser. The reality is that each of the options has unique strengths and limitations that could make a simple database task in the browser take hours of reading docs.

这些选项中的每一个最初都是出于相同目的设计的:在浏览器中提供持久存储。 现实情况是,每个选项都有其独特的优势和局限性,可能会使浏览器中的简单数据库任务花费数小时来阅读文档。

To install localForage run: $ npm install localforage

要安装localForage运行: $ npm install localforage

使用localForage的好处 (Benefits of Using localForage)

localForage solves this problem by providing a simple API that imitates localStorage while including other powerful features from other robust databases (like the ability to store blobs that IndexedDB provides).

localForage通过提供一个模仿localStorage的简单API来

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值