Where is chrome extension's 'chrome.storage.local' data saved?

若如初见. 提交于 2020-01-21 03:11:40

问题


I can find the previous localStorage api data in ~/.config/google-chrome/Default/Local Storage directory. I see that these are sqlite files which I can browse with sqlite3.

However, I'm moving from localStorage api to chrome.storage api and saving the information with chrome.storage.local method.

Now, how and where are these files are bing saved in my file system? I can't seem to find any information regarding this in their doc. Any help would be highly appreciated.


回答1:


For Windows, you can find different data related to your extension [extension_id] at these places

C:\Users\[user_name]\AppData\Local\Google\Chrome\User Data\Default\Local Extension Settings\[extension_id]

C:\Users\[user_name]\AppData\Local\Google\Chrome\User Data\Default\Sync Extension Settings\[extension_id]

C:\Users\[user_name]\AppData\Local\Google\Chrome\User Data\Default\IndexedDB\chrome-extension_[extension_id]

want to checkout chrome.storage data

  • open developer tools pointing your background page
  • type command

    chrome.storage.sync.get(null, function (data) { console.info(data) });

    or

    chrome.storage.local.get(null, function (data) { console.info(data) });




回答2:


For Firefox which now use the same format as Chrome for addon they are saved here:

C:\Users\Marc\AppData\Roaming\Mozilla\Firefox\Profiles\x5jztslz.default\browser-extension-data\



来源:https://stackoverflow.com/questions/17774857/where-is-chrome-extensions-chrome-storage-local-data-saved

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!