前缀 - 这是什么意思

prefixed - what does this means

当我 运行 HTML5 在 Android 本机浏览器中进行兼容性测试时,它会看到标记为 "Prefixed" 的 IndexedDB 支持,而在 Chrome 和其他浏览器中它被标记为 "Yes"。 我知道 Chrome 最新版本完全支持 IndexedDB 但 IndexedDB 支持 "Prefixed" 意味着什么?

根据 Mozilla 页面:

https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API/Using_IndexedDB

"Because the specification is still evolving, current implementations of IndexedDB hide under browser prefixes. Browser vendors may have different implementations of the standard IndexedDB API until the specification has solidified. But once consensus is reached on the standard, the vendors implement it without the prefix tags. Actually some implementations have removed the prefix: Internet Explorer 10, Firefox 16, Chrome 24. When they use a prefix, Gecko-based browsers use the moz prefix, while WebKit-based browsers use the webkit prefix."

根据乔希的评论: 使用类似于以下语句的内容来确保兼容性:

window.indexedDB = window.indexedDB || window.webkitIndexedDB;

字符'webkit'是前缀。您可能需要在 Android 中使用它们,但您不再需要在 Chrome 中使用它们(几年前您使用过)