javascript - IndexedDB 用户权限

标签 javascript indexeddb

大家好

我在这个页面上读到 [使用 IndexedDB]:https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API/Using_IndexedDB

浏览器会提示用户授予创建indexedDB的权限,用户也可以拒绝权限。请参阅下面的引述:

The most likely problem is that the user decided not to give your web app permission to create a database. One of the main design goals of IndexedDB is to allow large amounts of data to be stored for offline use. (To learn more about how much storage you can have for each browser, see Storage limits.)

Obviously, browsers do not want to allow some advertising network or malicious website to pollute your computer, so browsers prompt the user the first time any given web app attempts to open an IndexedDB for storage. The user can choose to allow or deny access.

但是,在我的本地主机上进行测试时,Firefox 和 Google Chrome 都没有征求我的许可。并且数据库已成功创建(似乎。)

那么,那篇文章过时了吗?还是因为我在本地主机上测试?还是我缺少的其他东西?

亲切的问候

最佳答案

这篇文章已经过时了。根据您使用 IndexedDB 的方式,you might never get a prompt ,但这取决于浏览器,并且将来可能会发生变化。

关于javascript - IndexedDB 用户权限,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30872202/

相关文章:

javascript - 尝试在indexedDB中存储文件时出现错误 "The object store currently does not support blob values"

IndexedDB 和同源策略

javascript - Node : Is there a way to stream a file from another server without piping through mine?

javascript - 带有标签/文本的 Google Map API v3 多标记

javascript - 为什么当元素更新位置时 touchmove 会被中断?

javascript - 在 IndexedDb 数据存储中存储一个函数

javascript - 在同一域的两个不同离线 Web 应用程序中创建/访问 indexedDB 使用相同的数据库

javascript - 可变 URL 参数触发 403 禁止错误

javascript - 如何使用 node.js twit 获取用户的推特流?

javascript - 为什么 IDBKeyRange.only() 不允许 bool 值?