w3c / webextensions

Charter and administrivia for the WebExtensions Community Group (WECG)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Proposal: Extension Loading Priority

erosman opened this issue · comments

Proposal: Extension Loading Priority

There are extensions that due to their specific functions, need to be loaded as soon as possible.
For example, extensions with the following permissions would need to be prioritised:

  • privacy
  • proxy

It would be good to have a consensus on the issue.

Safari does not support privacy or proxy permissions, but we do load extensions right away at launch to have content blockers and injected scripts ready before pages load.

Added spec clarification Needs clarification when specified because a call out to early startup behavior in the spec, even a non-normative note would be useful. It is not clear whether we can require browser implementations to activate on early startup due to the performance impact any such guarantees would have, so I expect that we cannot do more other than adding a non-normative note.

In practice, Firefox tries to make sure that extensions are loaded in situations where needed. The proxy and webRequest APIs specifically block the startup (implemented in https://bugzilla.mozilla.org/show_bug.cgi?id=1447551). Due to performance concerns we haven't implemented that for declarativeNetRequest yet (https://bugzilla.mozilla.org/show_bug.cgi?id=1821676).

It should also be noted that the priority should also apply when compared with other extensions. That is to say, extensions with above specific functions should be loaded BEFORE other extensions.