Skip to content

Proposal for Manifest V3: add permission allowing a background script to be persistent #44

@ariasuni

Description

@ariasuni

Context: last meeting, we discussed issue #11, I invite you to read the meeting notes about it. I’m writing here my proposal more formally, so that it can be properly discussed.

One of the most disruptive change of the MV3 is to request ServiceWorkers (SW), with a limited lifetime, instead of a (possibly persistent) background page. I believe this will cause more deviation from standard web development:

  • Fragmentation. A number of extensions consist of such a web application with additional features and integrations, and stronger security guarantees (because it’s signed and executed in isolation). Restriction to extensions will lead to significant divergences between standard web applications/websites and browser extensions.
  • Porting cost. Making SW a requirement will make porting traditional web applications to WebExtensions harder, and will force a lot of extension editors to rewrite a potentially significant part of their codebase so that it fits the SW model (if at all possible).
  • Worse performance for some bigger extensions. One of the interest of WebExtensions is that you can load things in the background to improve the user experience. Not being able to stay persistent or to save a significant amount of data will make WebExtensions less interesting in this regard.
  • Less powerful. The limitations of SW will make WebExtensions less powerful than regular websites in a lot of cases. WebExtensions cannot properly extend the browser features and reach high standards of UX, outside of simple tasks, if we’re limited in this way.

The idea behind my proposal is to give the capability to WebExtensions to be persistent if they need it, with an additional permission in manifest.json. This doesn’t rule out the possibility of default to and encouraging the use of SW, and leave the possibility to only allow this capability on desktop. The stores distributing the extensions could also warn that an extension can stay permanently in the background.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions