Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IndexedDB, unlimitedStorage and accessing database created in content script from background/options script

A few questions regarding IndexedDB, unlimitedStorage permission and accessing database created in content script from background/options script:

  1. Does "unlimitedStorage" permission covers databases created in background.js? (it's unclear in the docs)
  2. Does "unlimitedStorage" permission covers databases created in content.js on matched domains?
  3. Does database created in content.js on matched domain is schemeless? (i.e. will content scripts running on http:// and https:// access the same database?)
  4. Will database created in content script for matched domain be accessible from other extension's content script and will it survive extension removal?
  5. What is the way to access database for given domain from background/options.js? (assuming there is no content script that can be used to sent a message to)

I hope the answers for 1-4 are positive, but it would be good to have a definitive answer from the developers.

like image 979
przemoc Avatar asked Sep 06 '12 19:09

przemoc


1 Answers

Yes for all your questions (except question 4)... ^_^

By the way, I recommend you only interact directly with localStorage (or some else) in background.js, then other script can work with localStorage data via background.js (using Message passing)

like image 162
KimKha Avatar answered Mar 29 '23 10:03

KimKha