Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ariasuni opened this issue Jul 22, 2021 · 3 comments
Labels
opposed: chrome Opposed by Chrome opposed: safari Opposed by Safari proposal Proposal for a change or new feature topic: service worker Related to service worker background scripts

Comments

@ariasuni
Copy link
Contributor

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.

@carlosjeurissen
Copy link
Contributor

Related:
#16

And issues due to the lack of persistent background scripts:

  1. Take a password manager. It would need to fetch encrypted passwords, decrypt them and load them in memory in the background page. This takes quite some time, effort and energy. When the background page shuts down every now and then, it has to do this over and over again resulting into a lot of energy consumption and bad performance. Especially since the passwords are needed on many websites.
  2. List of use cases for persistent scripts can be found in this crbug 1152255
  3. Use cases that are not well served by service workers #72 (comment)
  4. Use cases that are not well served by service workers #72 (comment)

dotproto pushed a commit that referenced this issue Oct 29, 2021
- Issues: #109, #103, #112, #44
- PRs: -
- Mentioned issues without link to issue: -
dotproto pushed a commit that referenced this issue Oct 29, 2021
List of issues/PRs in order of appearance in the input:
- Issues: #109, #103, #112, #44
- PRs: -
- Mentioned issues without link to issue: -
@craiglurey
Copy link
Contributor

Hi, was there any further discussion regarding this option? Password managers in particular are severely affected by this change.

@rdcronin
Copy link
Contributor

Unfortunately, I don't think this is something we'll change in Chrome.

Since Safari and Chrome are both opposed to this and Firefox doesn't support service workers, I'm going to close this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
opposed: chrome Opposed by Chrome opposed: safari Opposed by Safari proposal Proposal for a change or new feature topic: service worker Related to service worker background scripts
Projects
None yet
Development

No branches or pull requests

6 participants