我希望在Chrome中存储大量数据客户端,我有哪些选择? [英] I wish to store large amounts of data client side in Chrome, what are my options?

查看:94
本文介绍了我希望在Chrome中存储大量数据客户端,我有哪些选择?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究客户端专用的东西,它处理一些数字并将其显示在图形中.

I'm working on client-side only thing that crunches some numbers and displays them in graphs.

我从服务器提取数据.首先,我每24小时将数据保存到localStorage,这已经工作了一段时间,但现在数据集已经足够大以适合localStorage. Firefox允许您删除localStorage的大小限制,但是Chrome没有类似的设置.我更喜欢在Chrome中工作.

I pull the data from a server. To start with I saved the data to localStorage every 24 hours, this worked for a while but now the data-set is to large to fit in localStorage. Firefox allows you to remove the size-limit on localStorage, but Chrome doesn't have any setting like that. I would prefer working in Chrome.

Chrome支持requestFileSystem API,该API允许您创建和保存文件,但是其他浏览器已决定不支持该文件,并且没有很好的文档记录/使用范围广泛.理想情况下,我更喜欢chrome更致力于的东西,因此他们不会突然放弃对它的支持.

Chrome supports the requestFileSystem API, that allows you to create and save files, but other browsers have decided to not support it and not very well documented/widely used. Ideally I would prefer something that chrome is more committed to, so they don't drop support for it all of a sudden.

此应用程序仅适合我,因此某些扩展名,高级设置很好,也可以通过某种方式设置我要导入的数据文件的缓存,客户端可以使用.

This application is only for me, so some extensions, advanced settings is fine, also some way to set the cahcing for the data-file i'm importing, client side would work.

推荐答案

使用IndexedDB.这是一些与本地存储和本地比较的比较. IndexedDB

Use IndexedDB. Here are some comparisons b/w localstorage & IndexedDB

  • 小数据
  • 同步
  • 键值对
  • 大数据
  • 异步
  • 提供索引
  • 可以运行查询
  • 支持交易&简单数据类型
  • 以对象形式存储数据
  • 例如:待办事项列表(keep.google.com)

这篇关于我希望在Chrome中存储大量数据客户端,我有哪些选择?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆