Firefox Extensions

Extensions in Firefox 66

Firefox 66 is currently in beta and, for extension developers, the changes to the WebExtensions API center primarily around improving performance, stability, and the development experience. A total of 30 issues were resolved in Firefox 66, including contributions from several volunteer community members.

Major Performance Improvements for Storage

I want to start by highlighting an important change that has a major, positive impact for Firefox users. Starting in release 66, extensions use IndexedDB as the backend for local storage instead of a JSON file. This results in a significant performance improvement for many extensions, while simultaneously reducing the amount of memory that Firefox uses.

This change is completely transparent to extension developers – you do not need to do anything to take advantage of this improvement.  When users upgrade to Firefox 66, the local storage JSON file is silently migrated to IndexedDB. All extensions using the storage.local() API immediately realize the benefits, especially if they store small changes to large structures, as is true for ad-blockers, the most common and popular type of extension used in Firefox.

The video below, using Adblock Plus as an example, shows the significant performance improvements that extension users could see.

Other Improvements

The remaining bug fixes and feature enhancements won’t be as noticeable as the change to local storage, but they nevertheless raise the overall quality of the WebExtensions API and make the development experience better.  Some of the highlights include:

Thank you to everyone who contributed to the Firefox 66 release, but a special thank you to our volunteer community contributors, including: tossj, Varun Dey, and Edward Wu.

6 comments on “Extensions in Firefox 66”

  1. Robert Ab wrote on

    Introduction of IndexedDB databases caused important regression related to more incompatibility between extension data in different profiles.

    https://www.reddit.com/r/firefox/comments/ar78wr/firefox_extensions_to_use_different_storage_type/egmdkul
    https://bugzilla.mozilla.org/show_bug.cgi?id=1429838#c6

    Me and many other users like to archive Firefox profile folder often, so I could use it in the case of problems with current profile. Users also move data between profiles.

    Can you fix this problem?

  2. Juraj M wrote on

    Does this mean I don’t have to use IndexedDB anymore because `storage.local` will have the same performance?

    Actually I just realized that IndexedDB supports Blobs and Files as well, so there are still some use-cases for that…

  3. Ankit wrote on

    How much does it cost to publish and list the extension in firefox store. Also are there any annual or 1 time registration plans like other browsers have.?

    1. Caitlin Neiman wrote on

      There’s no cost to publishing extensions on addons.mozilla.org. 🙂

  4. Markus Hartung wrote on

    We switched away from IndexedDB in our extension because it wasn’t accessible when the user set his privacy settings to not create a history.
    Is storage.local still persistent in this case and is it Intended that IndexedDB itself isn’t accessible in this case?

    1. Caitlin Neiman wrote on

      Unlike the IndexedDB API available in the extension pages windows, the storage.local API with the IDB backend is available when Firefox is running in permanent private browsing mode. Firefox restarts to run in this mode when a user sets their privacy settings to not create a history. 🙂