IndexedDB User Permissions

4.7k views Asked by At

Good day, all

I read on this page [Using IndexedDB]: https://developer.mozilla.org/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 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.

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

1

There are 1 answers

0
dumbmatter On BEST ANSWER

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.