2

I have many big images stored in the IndexedDB database but when I start Incognito window, I cannot access this database.

Only chrome.storage.local is shared between normal and Incognito instances but it's limited to 5MB so I can't use it to share all those data.

Is there a way to send data from my background script to the Incognito background script?

icl7126
  • 5,740
  • 4
  • 53
  • 51
  • chrome.storage is not limited to 5MB because Chrome switched to quota management long time ago (the extension's documentation is semi-abandoned so don't look there), but it's terribly slow with big data as it can't store blobs/arraybuffers. You may want to add `unlimitedStorage` permission just in case anyway. The only other possibility that might work is the old HTML5 FileSystem so give it a try. – wOxxOm Nov 19 '20 at 12:13
  • I'm not looking for IndexedDB replacement as I'm storing image Blobs there and when I was using Data URLs image format (base64 strings) it was causing huge performance issues when user had some other [extensions](https://bugzilla.mozilla.org/show_bug.cgi?id=1490932) installed. The `unlimitedStorage` cold help (if I just mirror data there) but it's way too scary so I really want to avoid it. All I need is access some of these data when user opens Incognito window... One idea is to write a wrapper around `chrome.storage.local` API to have a messages system between normal and Incognito contexts. – icl7126 Nov 19 '20 at 12:49
  • There's nothing scary in `unlimitedStorage` because it doesn't change anything: the storage is already essentially unlimited, it's determined by the available disk space. – wOxxOm Nov 19 '20 at 12:53
  • I meant for the end users - there used to be a message when installing extension that it can Store unlimited data on your PC, but it looks like it's not there anymore... – icl7126 Nov 19 '20 at 13:13

0 Answers0