Where are the data for "Extension Storage" of a firefox extension stored in?
Asked Answered
T

1

7

Suppose you have a Firefox extension. And then you go to about:debugging => this firefox => and then you click on "Inspect" on the extension...

It will then open about:devtools-toolbox for that extension, and you can click on "Storage". One of the storage options is "Extension Storage"...

My question is where is the data for this "Extension Storage" stored in in the filesystem so that I can access it programatically with some script outside Firefox?

If I'm not mistaken, they may be stored in some .sqlite file in the Firefox profile directory, but which .sqlite file exactly is it stored in?

Note: "Extension Storage" are the data stored using this API: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/storage/local using the browser.storage.local.get() and browser.storage.local.set() methods

Tellurium answered 25/12, 2020 at 12:34 Comment(0)
W
7

It used to be inside certain storage.js files, but is now stored with IndexedDB logic. You'll find it at [firefox profile folder]/storage/default/moz-extension+++[the extension id]^userContextId=4294967295/idb/3647222921wleabcEoxlt-eengsairo.sqlite

In there, the data is stored compressed and not readable without some tooling.

Sources:

Waggery answered 14/3, 2022 at 13:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.