HTML5 localStorage的替代品 [英] Alternatives to HTML5 localStorage

查看:65
本文介绍了HTML5 localStorage的替代品的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在客户端上持久存储键/值对时,localStorage的替代方案是什么?理想情况下,我正在寻找用户不能无意删除的内容(理论上可以使用localStorage删除它们).

What are my alternatives to localStorage for persisting key/value pairs on the client? Ideally I'm looking for something that the user can't inadvertently delete (as they theoretically could with localStorage).

推荐答案

使用HTML5,您的本地存储选项仅限于以下内容:

With HTML5 your local storage options are limited to the following:

  • localStorage
  • cookies
  • Web SQL(在WebKit和Opera中)
  • IndexedDB(在所有现代体面的浏览器中)

…但是,用户可以删除这些存储区中的任何数据,这是应该的.

… however, users can delete data in any of these stores, and that is as it should be.

这篇关于HTML5 localStorage的替代品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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