20 April 2012

Sync extra preferences in Firefox and extensions

Syncing to the ‘cloud’ has become one of the major trends lately and for good reason: it can provide both a consistent experience on every device you use and a means to restore your previous setup easily upon reinstall. Browsers like were among the first to offer online syncing; Firefox and Chrome also followed with their own solutions. I recently discovered from a very informative (German language) blog focused on Mozilla products that the sync features in Firefox go a lot deeper than expected: you can actually sync individual preferences as defined in about:config, including those set by add-ons, with some manual work unfortunately.

The procedure is pretty straight-forward:

  • Make sure you have enabled ‘Sync Preferences’ in the browser options;
  • Visit about:config and search for the preference you want to sync to every Firefox instance you added to the sync pool. For example here I have selected browser.search.context.loadInBackground;
  • Right-click the line and in the context menu click ‘Copy Name’;
  • Right-click again and insert a new Boolean preference;
  • Paste the name of the original preference and prefixed it with services.sync.prefs.sync. – in this case the new name will be services.sync.prefs.sync.browser.search.context.loadInBackground.
  • When prompted, choose ‘True’ to enable syncing for the original preference.Firefox manually sync more preferences

This also works for entries generated by extensions (e.g. extensions.searchwp.highlight.minLength from SearchWP), which always start with extensions. – in this case the new preference is services.sync.prefs.sync.extensions.searchwp.highlight.minLength. Firefox already sets up syncing for some preferences – hard to say what the criteria is… – and some extensions could be already taking advantage of this – and the rest probably should too. Combined with the native ability to sync installed add-ons this would make managing and configuring extensions much easier.

While having this extra power for syncing is very useful, I can’t help thinking the implementation could use some work. Having to manually create entries in about:config for every preference I want to sync is not exactly user-friendly. Why not simply sync all preferences across devices? Or, better yet, only preferences with status ‘user set’, meaning non-default values the users changed themselves or through an extension. Which brings me back to the point I made in the closing paragraph of a previous article: is delivering a consistent, while not very customizable, out-of-the-box experience, is very flexible, but also unpolished and complicated. Sure, someone could write an extension to add an UI for this feature (it wouldn’t need much of an interface, simply a list of checkboxes next to the entries to be synced), but why not deliver a complete experience upon install? The way things are now I’m sure a very small number of users will even discover this is possible, let alone use it at it’s full potential.

1 comment:

  1. I think its only because every new version of Firefox comes with different settings, and maybe some will be dropped, or have vulnerabilities, thats why they only allow to sync whitelisted prefences

    ReplyDelete