Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Will a WebSQL DB sync with Chrome's app sync?

I'm building a packaged app for Chrome. I'm currently using WebSQL to store/retrieve data. Will data I input on one machine show up on another machine if I choose to sync apps in Chrome?

For example, on my desktop I open the app and add a record. If I open the app on my laptop will that record show up?

I'm not to the point where I can sync my app yet, so I can't test it myself. Has anybody done this before?

like image 928
Roger Avatar asked Feb 02 '11 16:02

Roger


People also ask

Are Chrome extensions synced?

When you turn on Google Chrome browser sync, then all your chrome extensions will be automatically installed on all your devices. Also, the settings and state for all these extensions will be the same on all your devices.

How do I get Chrome extensions automatically installed and sync on all devices?

Go to the app or extension that you want to automatically install. Under Installation policy, choose Force install or Force install + pin. Click Save.

Should you sync your Chrome data?

Should You Sync Data in Chrome. Syncing Chrome's data offers a seamless experience by making it natural to switch between multiple devices or to a new device. You don't have to dig into your data on other devices just for a simple tab or a bookmark. With Chrome sync, it's accessible immediately across devices.


2 Answers

No, Chrome unfortunately (?) won't sync your WebSQL DB. You have to handle syncing through your server. Just look at the choices Chrome gives you in the sync preferences:

  • Preferences
  • Bookmarks
  • Extensions
  • Autofill
  • Themes
  • Apps

Notice that not even Cookies are listed, let alone WebSQL databases. Syncing Databases would also be technically difficult, because they can get pretty big. The initial limit for WebSQL databases seems to be 5MB or something like that, but they can request more as needed. I think installed web apps can even request unlimited storage permissions.

Also there would be concurrency problems if two users edited the same data at the same time.

like image 192
Jannes Meyer Avatar answered Mar 09 '23 00:03

Jannes Meyer


IMPORTANT: Just realized this is only in the trunk for google Chrome and not stable channel yet. So it's hopefully coming but this feature is not available to general audiences yet :(

I was looking for similar functionality and I think I found it in Google's storage extension API - http://code.google.com/chrome/extensions/trunk/storage.html

When using storage.sync, the stored data will automatically be synced to any Chrome browser that the user is logged into, provided the user has sync enabled.

I have yet to test it out, but if it works, it would definitely make sharing common data for simple extensions that much easier.

like image 44
David Avatar answered Mar 09 '23 01:03

David