How to avoid fully loading tabs opened by WebExtension API

When a WebExtension opens a new browser window with multiple tabs (by passing in an array of URLs to the url property of the window creation object that is passed to, the new browser window opens with the tabs loaded all at once.

Is it possible for a WebExtension, when opening/creating a new browser window in this manner, to only load the URL for the active browser tab, and leave the other tabs visible in the tab strip, but their contents are not loaded? I want the new browser window creation to be faster and more efficient by keeping the inactive tabs unloaded, and only loading their content when the user switches to them.

Create the window with just one URL. After the window is created, the rest of the tabs can be created in the window using the discarded property.

1 Like