x10*_*x10 6 google-chrome cloud-hosting local-storage
我正在制作一个小型Chrome扩展程序,并希望将其数据保持在线状态.
我需要一个免费的,非常小的(每个用户<1MB)云托管提供商,它具有无痛的身份验证.
理想情况下,我只是喜欢使用localStorage的Google API,但是在云端,每个用户名都不同.
Jas*_*all 15
仅供参考,有一个新的扩展API可以异步存储用户设置等内容,并可选择在用户的其他设备上同步它们.
https://developer.chrome.com/extensions/storage.html
例如:
chrome.storage.sync.set({name:'Bob'}, function() {
console.log('Name saved');
});
// Later on...
chrome.storage.sync.get('name', function(r) {
console.log('Name retrieved: ' + r['name']);
});
Run Code Online (Sandbox Code Playgroud)
使用sync
将在设备之间同步,local
不会使用.
为什么不能使用Google App Engine?API非常易于使用.或者使用与每个用户相关联的其他Google服务,例如Google文档.这就是Google Chrome Sync存储通过文档在浏览器中同步的书签的方式.
关于localStorage,localStorage是JavaScript(客户端)的关键值存储API.如果要在外部在线存储扩展的localStorage,可以通过联系某些外部(无论使用哪种API)服务来迭代存储键/值并存储它们.并在每次扩展开始时检索它们(在background.html页面中).
你为什么要那样做?Google Chrome Sync会默认同步所有这些信息.
归档时间: |
|
查看次数: |
4728 次 |
最近记录: |