什么"实现DOM存储API"意味着? [英] What does "enable DOM storage API" mean?

查看:201
本文介绍了什么"实现DOM存储API"意味着?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我碰到这个机器人的WebView功能 WebSettings.setDomStorageEnabled(真)键,单从名字,我可以推断,它只是实现​​DOM存储。

I came across this Android WebView function WebSettings.setDomStorageEnabled(true) and from the name alone I can infer that it simply "enables DOM storage".

Android的文件,不过,暗示一些稍有不同:

The Android documentation, however, suggests something slightly different:

设置是否对DOM存储API是   启用。

Set whether the DOM storage API is enabled.

IOW,它能够在 API ,而不是存储本身。

IOW, it enables the API rather than the storage itself.

我的问题是...我不知道这样的API的存在,直到我遇到了这个功能。

My problem is... I didn't know about the existence of such an API until I encountered this function.

我的谷歌搜索显示,这个API是密切HTML5.

My Google search suggests that this API is closely associated with HTML5.

  1. 难道说,这个功能是 不相干的网站/网页 不要使用HTML5? IOW,是否 影响现有非HTML5页面 装载和放大器;呈现在所有?
  2. <打击>我在哪里可以了解更多有关DOM 存储API?
  3. 在特定的,有什么陷阱 或注意事项,我需要看的 当调用 WebSettings.setDomStorageEnabled(真) 在一个Android应用程序?
  4. 为什么默认情况下禁用?
  1. Does that mean that this function is irrelevant to web sites/pages that do not use HTML5? IOW, does it affect existing non-HTML5 page loading & rendering at all?
  2. Where can I learn more about the DOM storage API?
  3. In particular, are there any gotchas or caveats that I need to watch for when calling WebSettings.setDomStorageEnabled(true) in an Android app?
  4. Why is it disabled by default?

更新:我现在至少可以回答的问题#2:事实证明,对于DOM存储的通用名称是网络存储,并有一个关于这整个维基百科的文章:< A HREF =htt​​p://en.wikipedia.org/wiki/Web_Storage> http://en.wikipedia.org/wiki/Web_Storage

Update: I now can at least answer question #2: It turns out that the common name for "DOM Storage" is "Web Storage" and there is an entire Wikipedia article about this: http://en.wikipedia.org/wiki/Web_Storage

推荐答案

我相信这个功能是无关紧要对于不使用HTML 5规范,因为它是规范的一部分网站。我会想象最主要的看出来的时候启用这个API是,它会再允许任何网站,采用DOM存储的优势,利用上述设备上的存储选项。我会想象它在默认情况下节省空间和安全禁用。

I believe this functionality is irrelevant for websites that do not use the HTML 5 specifications, since it is part of that spec. I would imagine the main thing to look out for when enabling this API is that it would then allow ANY website that takes advantage of DOM storage to use said storage options on the device. I would imagine it is disabled by default for space savings and security.

这篇关于什么&QUOT;实现DOM存储API&QUOT;意味着?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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