{"id":9038,"date":"2022-05-18T09:00:21","date_gmt":"2022-05-18T16:00:21","guid":{"rendered":"https:\/\/blog.mozilla.org\/addons\/?p=9038"},"modified":"2022-05-18T08:57:42","modified_gmt":"2022-05-18T15:57:42","slug":"manifest-v3-in-firefox-recap-next-steps","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/addons\/2022\/05\/18\/manifest-v3-in-firefox-recap-next-steps\/","title":{"rendered":"Manifest v3 in Firefox: Recap &amp; Next Steps"},"content":{"rendered":"<p>It\u2019s been about a year since our last update regarding Manifest v3. A lot has changed since then, not least of which has been the formation of a <a href=\"https:\/\/github.com\/w3c\/webextensions\">community group<\/a> under the W3C to advance cross-browser WebExtensions (WECG).<\/p>\n<p>In <a href=\"https:\/\/blog.mozilla.org\/addons\/2021\/05\/27\/manifest-v3-update\/\">our previous update<\/a>, we announced that we would be supporting MV3 and mentioned Service Workers as a replacement for background pages. Since then, it became apparent that numerous use cases would be at risk if this were to proceed as is, so we went back to the drawing board. We <a href=\"https:\/\/github.com\/w3c\/webextensions\/issues\/134\">proposed Event Pages<\/a> in the WECG, which has been welcomed by the community and supported by Apple in Safari.<\/p>\n<p>Today, we\u2019re kicking off our Developer Preview program to gather feedback on our implementation of MV3. To set the stage, we want to outline the choices we\u2019ve made in adopting MV3 in Firefox, some of the improvements we\u2019re most excited about, and then talk about the ways we\u2019ve chosen to diverge from the model Chrome originally proposed.<\/p>\n<h2>Why are we adopting MV3?<\/h2>\n<p>When we <a href=\"https:\/\/blog.mozilla.org\/addons\/2015\/08\/21\/the-future-of-developing-firefox-add-ons\/\">decided to move to WebExtensions<\/a> in 2015, it was a long term bet on cross-browser compatibility. We believed then, as we do now, that users would be best served by having useful extensions available for as many browsers as possible. By the end of 2017 we had completed that transition and moved completely to the WebExtensions model. Today, many cross-platform extensions require only minimal changes to work across major browsers. We consider this move to be a long-term success, and we remain committed to the model.<\/p>\n<p>In 2018, Chrome announced Manifest v3, followed by Microsoft adopting Chromium as the base for the new Edge browser. This means that support for MV3, by virtue of the combined share of Chromium-based browsers, will be a de facto standard for browser extensions in the foreseeable future. We believe that working with other browser vendors in the context of the WECG is the best path toward a healthy ecosystem that balances the needs of its users and developers. For Mozilla, this is a long term bet on a standards-driven future for WebExtensions.<\/p>\n<h2>Why is MV3 important to improving WebExtensions?<\/h2>\n<p>Manifest V3 is the next iteration of WebExtensions, and offers the opportunity to introduce improvements that would otherwise not be possible due to concerns with backward compatibility. MV2 had architectural constraints that made some issues difficult to address; with MV3 we are able to make changes to address this.<\/p>\n<p>One core part of the extension architecture is the background page, which lives forever by design. Due to memory or platform constraints (e.g. on Android), we can\u2019t guarantee this state, and termination of the background page (along with the extension) is sometimes inevitable. In MV3, we\u2019re introducing a new architecture: the background script must be designed to be restartable. To support this, we\u2019ve reworked existing and introduced new APIs, enabling extensions to declare how the browser should behave without requiring the background script.<\/p>\n<p>Another core part of extensions are content scripts, to directly interact with web pages. We are blocking unsafe coding practices and are offering more secure alternatives to improve the base security of extensions: string-based code execution has been removed from extension APIs. Moreover, to improve the isolation of data between different origins, cross-origin requests are no longer possible from content scripts, unless the destination website opts in via CORS.<\/p>\n<h3>User controls for site access<\/h3>\n<p>Extensions often need to access user data on websites. While that has enabled extensions to provide powerful features and address numerous user needs, we\u2019ve also seen misuse that impacts user\u2019s privacy.<\/p>\n<p>Starting with MV3, we\u2019ll be treating all site access requests from extensions as optional, and provide users with transparency and controls to make it easier to manage which extensions can access their data for each website.<\/p>\n<p>At the same time, we\u2019ll be encouraging extensions to use models that don\u2019t require permanent access to all websites, by making it easier to grant access for extensions with a narrow scope, or just temporarily. We are continuing to evaluate how to best handle cases, such as privacy and security extensions, that <i>need<\/i> the ability to intercept or affect all websites in order to fully protect our users.<\/p>\n<h2>What are we doing differently in Firefox?<\/h2>\n<h3>WebRequest<\/h3>\n<p>One of the most controversial changes of Chrome\u2019s MV3 approach is the removal of blocking WebRequest, which provides a level of power and flexibility that is critical to enabling advanced privacy and content blocking features. Unfortunately, that power has also been used to harm users in a variety of ways. Chrome\u2019s solution in MV3 was to define a more narrowly scoped API (declarativeNetRequest) as a replacement. However, this will limit the capabilities of certain types of privacy extensions without adequate replacement.<\/p>\n<p>Mozilla will maintain support for blocking WebRequest in MV3. To maximize compatibility with other browsers, we will also ship support for declarativeNetRequest. We will continue to work with content blockers and other key consumers of this API to identify current and future alternatives where appropriate. Content blocking is one of the most important use cases for extensions, and we are committed to ensuring that Firefox users have access to the best privacy tools available.<\/p>\n<h3>Event Pages<\/h3>\n<p>Chrome\u2019s version of MV3 introduced <i>Background Service Worker<\/i> as a replacement for the (persistent) <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Mozilla\/Add-ons\/WebExtensions\/Anatomy_of_a_WebExtension\">Background Page<\/a>. Mozilla is working on extension Service Workers in Firefox for compatibility reasons, but also because we like that they\u2019re an <a href=\"https:\/\/github.com\/w3c\/webextensions\/issues\/51#issuecomment-892702868\">event-driven environment with defined lifetimes<\/a>, already part of the Web Platform with good cross-browser support.<\/p>\n<p>We\u2019ve found Service Workers can\u2019t fully support <a href=\"https:\/\/github.com\/w3c\/webextensions\/issues\/72\">various use cases<\/a> we consider important, especially around DOM-related features and APIs. Additionally, the worker environment is not as familiar to regular web developers, and our developer community has expressed that completely rewriting extensions can be tedious for thousands of independent developers of <a href=\"https:\/\/addons.mozilla.org\/en-US\/firefox\/extensions\/\">existing extensions<\/a>.<\/p>\n<p>In Firefox, we have decided to support Event Pages in MV3, and our developer preview will not include Service Workers (we\u2019re continuing to work on supporting these for a future release). This will help developers to more easily migrate existing persistent background pages to support MV3 while retaining access to all of the DOM related features available in MV2. We will also support Event Pages in MV2 in an upcoming release, which will additionally aid migration by allowing extensions to transition existing MV2 extensions over a series of releases.<\/p>\n<h2>Next Steps for Firefox<\/h2>\n<p>In launching our Developer Preview program for Manifest v3, our hope is that authors will test out our MV3 implementation to help us identify gaps or incompatibilities in our implementation. Work is continuing in parallel, and we expect to launch MV3 support for all users by the end of 2022. As we get closer to completion, we will follow up with more detail on timing and how we will support extensions through the transition.<\/p>\n<p>For more information on the Manifest v3 Developer Preview, please check out the <a href=\"https:\/\/extensionworkshop.com\/documentation\/develop\/manifest-v3-migration-guide\/\">migration guide<\/a>.\u00a0 If you have questions or feedback on Manifest v3, we would love to hear from you on the <a href=\"https:\/\/discourse.mozilla.org\/c\/add-ons\/35\">Firefox Add-ons Discourse<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It\u2019s been about a year since our last update regarding Manifest v3. A lot has changed since then, not least of which has been the formation of a community group &hellip; <a class=\"go\" href=\"https:\/\/blog.mozilla.org\/addons\/2022\/05\/18\/manifest-v3-in-firefox-recap-next-steps\/\">Read more<\/a><\/p>\n","protected":false},"author":1853,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[44,121,322922,278886],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Manifest v3 in Firefox: Recap &amp; Next Steps - Mozilla Add-ons Community Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.mozilla.org\/addons\/2022\/05\/18\/manifest-v3-in-firefox-recap-next-steps\/\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Rob Wu\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2022\/05\/18\/manifest-v3-in-firefox-recap-next-steps\/\",\"url\":\"https:\/\/blog.mozilla.org\/addons\/2022\/05\/18\/manifest-v3-in-firefox-recap-next-steps\/\",\"name\":\"Manifest v3 in Firefox: Recap &amp; Next Steps - Mozilla Add-ons Community Blog\",\"isPartOf\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#website\"},\"datePublished\":\"2022-05-18T16:00:21+00:00\",\"dateModified\":\"2022-05-18T15:57:42+00:00\",\"author\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/4dc482a6901b37c75e13a23d9b18e098\"},\"breadcrumb\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2022\/05\/18\/manifest-v3-in-firefox-recap-next-steps\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.mozilla.org\/addons\/2022\/05\/18\/manifest-v3-in-firefox-recap-next-steps\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2022\/05\/18\/manifest-v3-in-firefox-recap-next-steps\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/blog.mozilla.org\/addons\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Manifest v3 in Firefox: Recap &amp; Next Steps\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#website\",\"url\":\"https:\/\/blog.mozilla.org\/addons\/\",\"name\":\"Mozilla Add-ons Community Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.mozilla.org\/addons\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/4dc482a6901b37c75e13a23d9b18e098\",\"name\":\"Rob Wu\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/30e26944b9b786ea16fce8b18394c6e4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/30e26944b9b786ea16fce8b18394c6e4?s=96&d=mm&r=g\",\"caption\":\"Rob Wu\"},\"description\":\"Firefox engineer on the add-ons team at Mozilla.\",\"url\":\"https:\/\/blog.mozilla.org\/addons\/author\/robrobwu-nl\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Manifest v3 in Firefox: Recap &amp; Next Steps - Mozilla Add-ons Community Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.mozilla.org\/addons\/2022\/05\/18\/manifest-v3-in-firefox-recap-next-steps\/","twitter_misc":{"Written by":"Rob Wu","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/blog.mozilla.org\/addons\/2022\/05\/18\/manifest-v3-in-firefox-recap-next-steps\/","url":"https:\/\/blog.mozilla.org\/addons\/2022\/05\/18\/manifest-v3-in-firefox-recap-next-steps\/","name":"Manifest v3 in Firefox: Recap &amp; Next Steps - Mozilla Add-ons Community Blog","isPartOf":{"@id":"https:\/\/blog.mozilla.org\/addons\/#website"},"datePublished":"2022-05-18T16:00:21+00:00","dateModified":"2022-05-18T15:57:42+00:00","author":{"@id":"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/4dc482a6901b37c75e13a23d9b18e098"},"breadcrumb":{"@id":"https:\/\/blog.mozilla.org\/addons\/2022\/05\/18\/manifest-v3-in-firefox-recap-next-steps\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.mozilla.org\/addons\/2022\/05\/18\/manifest-v3-in-firefox-recap-next-steps\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/blog.mozilla.org\/addons\/2022\/05\/18\/manifest-v3-in-firefox-recap-next-steps\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.mozilla.org\/addons\/"},{"@type":"ListItem","position":2,"name":"Manifest v3 in Firefox: Recap &amp; Next Steps"}]},{"@type":"WebSite","@id":"https:\/\/blog.mozilla.org\/addons\/#website","url":"https:\/\/blog.mozilla.org\/addons\/","name":"Mozilla Add-ons Community Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.mozilla.org\/addons\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/4dc482a6901b37c75e13a23d9b18e098","name":"Rob Wu","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/30e26944b9b786ea16fce8b18394c6e4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/30e26944b9b786ea16fce8b18394c6e4?s=96&d=mm&r=g","caption":"Rob Wu"},"description":"Firefox engineer on the add-ons team at Mozilla.","url":"https:\/\/blog.mozilla.org\/addons\/author\/robrobwu-nl\/"}]}},"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/posts\/9038"}],"collection":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/users\/1853"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/comments?post=9038"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/posts\/9038\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/media?parent=9038"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/categories?post=9038"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/tags?post=9038"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}