IndexedDB,WebSQL在4个月内

编程入门 行业动态 更新时间:2024-10-25 17:27:33
本文介绍了IndexedDB,WebSQL在4个月内的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个问题,我要开始一个为期4-6个月的项目,该项目需要离线支持. AppCache很棒,已被接受为标准,但是大型浏览器仍不确定如何在Opera,Safari和Chrome中选择使用WebSQL(SQLite)和Mozilla以及IE支持IndexedDB来实现数据库.

I've got a bit of a problem, I'm about to start a 4-6 month project which will need offline support. AppCache is awesome and accepted as the standard but the big browsers are still undecided about the database implementation with Opera, Safari and Chrome opting for WebSQL (SQLite) and Mozilla and supposedly IE backing IndexedDB.

我知道Chrome将来还会开发IndexedDB选项,但我找不到有关任何发行日期等的任何信息.

I know that Chrome will also develop an IndexedDB option in the future but I could not find any info about any release dates etc.

现在,将其命名为11月4-6个月,我想拥有一个支持大多数(不一定是全部)最新版本浏览器(假设IE9退出,FF4和Chrome 6)的系统.我真的不想有一个IndexedDB/websql双重实现.将localStorage用作大型丑陋的Blob数据库的想法让我感到不寒而栗,我很想不使用Gears.

Now, in 4-6 months, lets call it November I want to have a system that supports most (does not have to be all) latest version browsers (assuming IE9 is out, FF4, and Chrome 6). I don't really want to have a IndexedDB/websql dual implementation. The thought of using localStorage as a big ugly blob database gives me the shivers and I would love not to use Gears.

尊敬的同事们建议我做什么,我应该走什么路?服用哪种药?

What do you, my esteemed colleagues recommend I do, what path should I follow? Which pill to take?

谢谢所有

Guido

推荐答案

我确实会(a.o.)进行本地存储.我在今年早些时候写了这样一个脱机网络应用程序的小概念证明(cfr.此博客文章和此处已离线启用的网络应用程序),基本方法是;

i would indeed go for (a.o.) localstorage. I wrote a small proof of concept of such an offline web-app earlier this year (cfr. this blogpost and the offline-enabled webapp here), the basic approach being;

  • 将数据放入数组/对象
  • 使用标准的javascript函数执行CRUD(或使用 jlinq )
  • 通过json-ify数组/对象进行存储
  • 使用类似 persistjs 的存储抽象库来存储/检索json定义的数组/对象
  • put data in arrays/ objects
  • use standard javascript functions to do CRUD (or go for jlinq)
  • json-ify the array/object for storage
  • use a storage-abstraction library like persistjs to store/ retrieve json-ified array/object

更多推荐

IndexedDB,WebSQL在4个月内

本文发布于:2023-11-22 09:47:34,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1616944.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:月内   IndexedDB   WebSQL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!