跨浏览器HTML5存储库 [英] Cross browser HTML5 storage library

查看:114
本文介绍了跨浏览器HTML5存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个要求,当互联网不可用时应将其存储在本地.它应该以跨浏览器兼容的方式处理它.据我所知,现在有多种选项可以在本地存储数据(indexedDB,WebSQL,localStorage).我真正想要的只是一个统一的API.我不想为多个存储引擎检测和编写代码.

I have one requirement where should be stored locally when internet is not available. It should handle it in cross browser compatible way. Now as I know there are variety of options to store the data locally (indexedDB, WebSQL, localStorage). All I really want is a unified API. I don't want to detect and write code for several storage engines.

我真正关心的只是提供一个密钥,并提供数据,并且该数据应在浏览器会话/崩溃之间持久保存.

All I really care about is give a key, and give the data and it should be persisted across browser sessions/crashes.

经过大量的搜索之后,我真正遇到的唯一一个库是persisJS:

After lot of googling the only library that I have actually come across is persisJS:

http://pablotron.org/?cid=1557

但它大约有4 1/2岁.有没有比这更好或更可靠和更新的东西了?

But it is roughly 4 1/2 years old. Is there anything better ormore reliable and newer than this?

推荐答案

尝试 SequelSphere

这是一个100%HTML5/JavaScript关系数据库,可以跨浏览器工作,并使用本地存储来保存其数据.您也可以使用SQL查询它.它是它自己的数据库引擎,并且不依赖于内置的关系数据库.因此,它可以在所有浏览器中使用.

It is a 100% HTML5/JavaScript Relational Database that works cross-browser and uses local storage to persist it's data. You can use SQL to query it as well. It is it's own database engine, and doesn't rely upon the built-in relational databases. As such, it will work across all browsers.

这篇关于跨浏览器HTML5存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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