chrome extension with cloud storage
Asked Answered
W

2

7

I'm making a small Chrome extension and would like to keep its data online.
I need a free and very small(<1MB per user) cloud hosting provider that has painless authentication.
Ideally, I'd just like a Google API that does localStorage, but in the cloud and different for each username.

Weaks answered 19/11, 2010 at 10:17 Comment(0)
A
5

Why can't you use Google App Engine? The API is pretty easy to use. Or use other Google services tied to each individual user such as Google Docs. That is how Google Chrome Sync stores bookmarks that are synchronized in your browser through Docs.

Concerning localStorage, localStorage is a key value storage API for JavaScript (Client Side). If you want to store your extension's localStorage externally online, you can iterate your storage keys/values and store them through contacting some external (whatever API you use) service. And retrieve them every time your extension starts (in background.html page).

Why would you do that though? Google Chrome Sync, synchronizes all those information by default.

Alcheringa answered 20/11, 2010 at 17:38 Comment(2)
App engine seems like a good choice. Btw, Do you know of a site with Chrome Sync examples?Weaks
Chrome Sync is done natively within the browser not within an Extension. They store the bookmarks in Google Docs (you can read the APIs that Docs has to offer and do the same if you want). If you just want to sync your prefs somewhere online (for online management), just iterate your list and store the keys in the Google App Engine datastore.Alcheringa
A
16

FYI there is a new extension API to asynchronously store things like user settings, and optionally sync them across the user's other devices.

https://developer.chrome.com/extensions/storage.html

For example:

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']);
});

Using sync will sync this across devices, using local will not.

Arran answered 30/6, 2012 at 19:52 Comment(0)
A
5

Why can't you use Google App Engine? The API is pretty easy to use. Or use other Google services tied to each individual user such as Google Docs. That is how Google Chrome Sync stores bookmarks that are synchronized in your browser through Docs.

Concerning localStorage, localStorage is a key value storage API for JavaScript (Client Side). If you want to store your extension's localStorage externally online, you can iterate your storage keys/values and store them through contacting some external (whatever API you use) service. And retrieve them every time your extension starts (in background.html page).

Why would you do that though? Google Chrome Sync, synchronizes all those information by default.

Alcheringa answered 20/11, 2010 at 17:38 Comment(2)
App engine seems like a good choice. Btw, Do you know of a site with Chrome Sync examples?Weaks
Chrome Sync is done natively within the browser not within an Extension. They store the bookmarks in Google Docs (you can read the APIs that Docs has to offer and do the same if you want). If you just want to sync your prefs somewhere online (for online management), just iterate your list and store the keys in the Google App Engine datastore.Alcheringa

© 2022 - 2024 — McMap. All rights reserved.