According to MDN,
Background scripts are loaded as soon as the extension is loaded and stay loaded until the extension is disabled or uninstalled.
My background script changes its behavior accordingly user’s options, stored on localStorage. When the user change options (using options_ui
), localStorage is updated, but since the background script stay loaded, user options are not honored. If the browser is reloaded, options are honored.
How do I reload the background script after the user change options?