本地存储是否是此Web应用程序的正确选择?

问题描述:

我有兴趣构建一个小型脱机网络应用程序,并且正在寻找一些建议.这是我想要做的事的基础

I'm interested in building a small offline webapp and I'm looking for some advice. Here's the basics of what I want it to do

  • 创建最初只包含名称和文本字段的报告
  • 列出,编辑和删除这些注释
  • 理想情况下,我想稍后在报告中添加更多字段

localstorage是在本地存储此类数据的好选择吗?如果是这样,有人可以引导我进入在javascript中与其进行交互的命令的完整列表吗?例如setItem,getItem等.

Is localstorage a good option for storing this type of data locally? If so, can anybody direct me to a complete list of the commands for interacting with it in javascript? e.g. setItem, getItem, etc.

谢谢.

localstorage可以很好地解决此问题,但不要将其视为可靠的解决方案.它只是基本的键/值存储,不会在处理数以千计的复杂事情时表现出色.

localstorage will work just fine for this, but don't think of it as a robust solution.. It's just a basic key/value store and won't be very performant with thousands of complex things going on.

查看有关本地存储的出色的Dive into HTML5指南: http://diveintohtml5.info/storage.html

Check out the excellent Dive into HTML5 guide on localstorage: http://diveintohtml5.info/storage.html