Chrome扩展程序,存储数据 [英] Chrome extension, Store data
问题描述
我读过这个问题: Chrome扩展程序& Javasctipy Database ,但我想要一个更详细和更清晰的答案。
如何存储我的一些扩展设置?
是否可以使用数据库在JavaScript中执行此类操作?
有没有好的教程?
我不想使用本地存储,因为我不要希望SESSIONS的行为
$
您可以使用 chrome.storage.sync
或 chrome.storage.local
(文档) 。两者都是本地存储(不是会话存储); 同步
具有额外的优点,即它可以与用户的Google帐户同步,前提是他们已将Chrome连接到该帐户。
I've read this question: Chrome Extensions & Javasctipy Database but I want an answer with more details and more clear.
How can I store some of my extension settings?
Is it possible to use a database to do such things with JavaScript?
Is there any good tutorial on it?
I don't want to use Local Storage, because I do not want the behavior of SESSIONS
Thanks.
You could use chrome.storage.sync
or chrome.storage.local
(docs). Both are local storage (not session storage); sync
has the additional advantage that it syncs to the user's Google account if they've connected Chrome to it.
这篇关于Chrome扩展程序,存储数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!