最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - IndexedDB User Permissions - Stack Overflow

programmeradmin6浏览0评论

Good day, all

I read on this page [Using IndexedDB]:

that browser will prompt user to give permission to create indexedDB, and the user may deny permission. See quote below:

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 puter, 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.

However, when testing on my localhost, neither Firefox nor Google Chrome asked me for permission. And the db was created successfully (it seems.)

So, is that article outdated? Or is it because I'm testing on localhost? or something else I'm missing?

Kind Regards

Good day, all

I read on this page [Using IndexedDB]: https://developer.mozilla/en-US/docs/Web/API/IndexedDB_API/Using_IndexedDB

that browser will prompt user to give permission to create indexedDB, and the user may deny permission. See quote below:

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 puter, 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.

However, when testing on my localhost, neither Firefox nor Google Chrome asked me for permission. And the db was created successfully (it seems.)

So, is that article outdated? Or is it because I'm testing on localhost? or something else I'm missing?

Kind Regards

Share Improve this question edited Jun 20, 2020 at 9:12 CommunityBot 11 silver badge asked Jun 16, 2015 at 15:40 BigNameBigName 1,0972 gold badges17 silver badges29 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 12

The article is outdated. Depending on how you use IndexedDB, you might never get a prompt, but it depends on the browser and that could change in the future.

发布评论

评论列表(0)

  1. 暂无评论