How to synchronize Chrome extension data on different computers? How to synchronize Chrome extension data on different computers? google-chrome google-chrome

How to synchronize Chrome extension data on different computers?


Chrome 20 supports chrome.storage.sync API. It seems to fit your requirements perfectly.


Edit: As of Chrome 20 and above you can use chrome.storage module to save to the cloud.

chrome.experimental.storage.sync.set({'settingAlwaysOn': true}, function() {  console.log('Saved option in the cloud');});

Before Chrome 20

You're right, the Chrome Sync for extensions options (in settings) does not synchronize extension data. The only way to synchronize those data is through a third party.

Since you ruled out the usage of Bookmarks, which makes sense if users don't want bookmarks to be synchronized.

Everytime you persist data through storage (Web SQL Storage, localStorage, IndexDB), you grab that object, and serialize it into JSON (via JSON.stringify), and you send it to some online service such as Google Docs.

That would be quite tricky for Web SQL Storage and IndexDB, you would have to do your own importer and exporter. For localStorage it is pretty simple, since its a key/value pair.

It requires some work to link it to a Google Account (such as Docs) you would have to use OAuth and do the plumbing to connect your extension to the service. Once your connected, it is not that difficult to maintain the state.

Good luck :)