If http://example.com/ creates an IndexedDB database, is it possible for a Chrome extension (used on domains other than example.com
) to open and query this database?
No, you can not do it. The data storage is sandboxed http://www.html5rocks.com/en/tutorials/offline/storage/
Being sandboxed wouldn't necessarily exclude allowing access, as Chrome extensions can make cross-domain HTTP requests when permission has been granted. In this case, though, there just doesn't seem to be a way to even ask for access to an IndexedDB from a specific domain.
Alf, add a bug at crbug.com describing your use case. Things like this have been discussed.
Important point: a content script can access it as long as a page at
example.com
is open.I'm also want to know the answer to this question and I'm a little be confused as I came across this: developers.google.com/web/fundamentals/instant-and-offline/…. Where it says: "Unlike server-side databases where you can restrict unauthorized access, client-side databases are accessible to browser extensions and developer tools, and they can be cleared by the user."