Migrating to WebExtensions: port your stored data

WebExtensions are the new standard for add-on development in Firefox, and will be the only supported type of extension in release versions of Firefox later this year. Starting in Firefox 57, which is scheduled to arrive in November 2017, extensions other than WebExtensions will not load, and developers should be preparing to migrate their legacy extensions to WebExtensions.

If you have a legacy extension that writes data to the filesystem, and you’re planning to port it to WebExtensions, Embedded WebExtensions are available now in Firefox 51 to help you transition. Embedded WebExtensions can be used to transfer the stored data of your add-on to a format that can be used by WebExtensions. This is essential because it lets you to convert your users without the need for them to take any actions.

What is an Embedded WebExtension?

An Embedded WebExtension is an extension that combines two types of extensions in one, by incorporating a WebExtension inside of a bootstrapped or SDK extension.

Why use an Embedded WebExtension?

There are attributes (functions) of legacy add-ons that are used to store information related to the add-on that are not available in WebExtensions. Examples of these functions include user preferences, arbitrary file system access for storing assets, configuration information, stateful information, and others. If your add-on makes use of functionality like these to store information, you can use an Embedded WebExtension to access your legacy add-on data and move it over to a WebExtension. The earlier you do this, the more likely all your users will transition over smoothly.

It’s important to emphasize that Embedded WebExtensions are intended to be a transition tool, and will not be supported past Firefox 57. They should not be used for add-ons that are not expected to transition to WebExtensions.

How do I define an Embedded WebExtension?

To get started, read the documentation below. You can also contact us—we’re here to help you through the transition.

MDN docs: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Embedded_WebExtensions

Examples: https://github.com/mdn/webextensions-examples/tree/master/embedded-webextension-bootstrapped


15 comments on “Migrating to WebExtensions: port your stored data”

  1. Andrew wrote on

    What about XUL extensions?

    There are so many things still missing from WebExtensions API that I can’t convert all of my 16 extensions! (In fact, I can hardly convert any of them.)

    Why the push for Nov, 2017? how about Nov, 2019? Maybe the WebExtensions API will be ready by then?

    1. Igor wrote on

      I don’t think that WebExtensions are meant to match the functionality of the XUL extensions. They are the future in regards of cross browser compatibility, not functionality.

      1. Anon wrote on

        Why care about cross browser compatibility, not functionality?

        1. Shane wrote on

          Agreed. Who cares if an extention works in another browser.
          Dropping functionality for non required niceness makes no sense.
          One word…if e tenting fail then fork

    2. Christian Foellmann wrote on

      I am with you!
      I am not an extension developer or maintainer myself but I wanted to help get the instantfox extension fixed up for the future. It seems there is no way to get this great functionality into FF anymore.
      I use FF because of the extensions. If I wanted something fast with extensions of limited use I would switch to Chrome.
      Mozilla wanted to make Firefox “great again” 😉 but with this path you just become a slow version of chrome.

      1. Nightson wrote on

        They won’t listen. There are so many people who have complained about this but their answer has always been the same – The decision has been made. Take it or fuck off.

  2. Lori wrote on

    Does that include data stored in sqlite files?

  3. HEMPEL Armelle wrote on

    my biggest problem is that recently (I am French living in Germany) all my attemps to install those extension dictionnaries which are essential to me failed which was never the case before I guess I to get out of fire fox and mozilla to get my dictionnaries again ! So annoying

    1. Babel wrote on

      I speak 4 languages and just created a new fresh Firefox profile yesterday. Dictionaries work.

  4. Barry Kelly wrote on

    This policy of destroying the existing addon ecosystem before the replacement has been feature-parity complete is insane.

    Imagine if you had a forced OS upgrade that meant that most of your existing applications would stop working, application developers will need to rewrite their apps, but the next version isn’t out yet and the APIs aren’t equivalent. Oh, and this OS’s market share is no more than 10%. Would you expect devs to sweat hard to hit a moving, incomplete target, in the vague hope that by the time it’s going to release, the features they need to implement their apps will exist?

    Nope. Nobody would make that effort. And a new OS without any apps wouldn’t have any users.

    Firefox without extensions is just a crappy version of Chrome. Extensions are the only thing that make it worth using.

    I’ve just learned about this policy. It means I’m going to have to ramp up my migration plans because I fully expect my extensions to not be ported.

  5. floodo1 wrote on

    So disappointing that Chrome/Opera compatibility trumps functionality/customization. Can’t believe Mozilla hasn’t reversed course on this tragedy. This will destroy the most crucial feature that Firefox has over Chrome/Opera which is that it can be customized in ways they cannot. Nearly every extensions I use exists only for Firefox.

    Now I’ll gain access to a bunch of inferior Chrome addonds through the magic of cross browser compatibility. Super helpful … NOT

  6. Jacq wrote on

    Ok taking bets: how long until someone forks firefox to keep the old/better extensions system?

  7. Joseph Grabko wrote on

    Good job breaking it, hero.

    I’m switching to Cyberfox. If they break it with your builds as well, I will use Pale Moon. The only reason I used Firefox to start with was the range of extensions. Shame on you for killing off a great browser.

  8. Igor wrote on

    I hope the person responsible for this already got his 30 silver coins.
    If being serious, extensions are one of the main reasons why I still use Firefox.
    * Vertical Tabs. All browser vendors blindly keep to position tab headers horizontally, when there’s a lot of horizontal space and little of vertical one
    * Auto Unload Tab. Keeps RAM and CPU usage at reasonable levels.
    * Session Manager. Because it’s much more reliable than default session storage
    * Tab Groups – because default ones were removed from FF.
    * Tab Mix Plus – using this one for several years. Default settings look like a bad joke.
    * NoScript – no comments.
    * uBlock Origin – because ads become more and more annoying, exponentially.

    Will WebExtensions be able to support functionality from all these addons?

  9. Christophe wrote on

    I was part of the old guard, around 2002, about. I was a fervent activist for the best browser, but today… It is the least worst, only, for me.
    How much time lost with discontinued features (tab groups, f1 labs, prism, xul and xulrunner), wilth Australis (not accessible on windows), newTab and privacy problems and hardness to change, user.js soon removed.and I forget a lot.
    No more freedom of choice.
    I no longer talk about firefox around me, I watch Chrome spread. I no longer want to promote Mozilla without assurances of long-term stability. Since3 years, it’s about 50 firefox abandonned because I no longer want to participate in this policy, proper of a commercial company as Google.

    Today for the fun, I wanted to develop an extension. WebExtensions is the future, ok, I test for a new tab for Unsplash, and… it’s not possible! With Chrome, yes, with Firefox, NO!
    After an hour of research, I see that I will have to wait until June (v54) to hope this possible.
    Discouraging, and I understand better why Luís Miguel abandons the dev of Tab Grroups:

    Without Tab Groups, I will search for an alternative. I can’t understand why to stop a functionality without alternative and unfortunately I have no longer hope on the survival of this software if office rats continue to ignore users’ opinions and think they are brainy..