本地存储是否是此Web应用程序的正确选择? [英] Is localstorage the right choice for this webapp?

查看:78
本文介绍了本地存储是否是此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

这篇关于本地存储是否是此Web应用程序的正确选择?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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