【问题标题】:how can i use local storage for storing values of multiple variables?如何使用本地存储来存储多个变量的值?
【发布时间】:2011-11-26 16:17:19
【问题描述】:

如何使用本地存储来存储多个变量的值?本地存储是否有任何限制。目前哪些浏览器都支持本地存储?

【问题讨论】:

  • 标准大小为每个域 5 或 10 MB

标签: javascript html


【解决方案1】:

这是一个关于 HTML5 本地存储限制的很好的讨论 HTML5 localStorage size limit for subdomains

关于浏览器,这里有一个列表,

Firefox 3.5, Safari 4, IE8, Chrome 4+: HTML5 localStorage; these modern browsers all support the core localStorage functionality defined in the HTML5 draft.

Firefox 2.x and 3.0: Gecko globalStorage, a very early implementation similar to HTML5’s localStorage.

Safari 3.1 & 3.2: HTML5 Database Storage, because Safari 3.1 and 3.2 don’t support HTML5 localStorage.

IE6, IE7: userData persistence, a rarely used IE feature for associating string data with an element on a web page and persisting it between pageviews.

Google Chrome Pre 4: Gears Database API, which is built into earlier versions of Chrome and thus doesn’t require a separate install.

以下是支持此功能的浏览器列表。 https://stackoverflow.com/questions/1194784/which-browsers-support-html5-offline-storage

变量个数没有限制,使用HTML5本地存储的详细解释可以看here

【讨论】:

    猜你喜欢
    • 2021-03-09
    • 1970-01-01
    • 1970-01-01
    • 2018-12-18
    • 1970-01-01
    • 1970-01-01
    • 2020-06-20
    • 1970-01-01
    • 2012-07-28
    相关资源
    最近更新 更多