Skip to main content
Version: 3.5

BrowserPoolOptions <Plugin>

Index

Properties

browserPlugins

browserPlugins: readonly Plugin[]

Browser plugins are wrappers of browser automation libraries that allow BrowserPool to control browsers with those libraries. browser-pool comes with a PuppeteerPlugin and a PlaywrightPlugin.

optionalcloseInactiveBrowserAfterSecs

closeInactiveBrowserAfterSecs?: number = <p>300</p>

Browsers normally close immediately after their last page is processed. However, there could be situations where this does not happen. Browser Pool makes sure all inactive browsers are closed regularly, to free resources.

optionalfingerprintOptions

fingerprintOptions?: FingerprintOptions

optionalmaxOpenPagesPerBrowser

maxOpenPagesPerBrowser?: number = <p>20</p>

Sets the maximum number of pages that can be open in a browser at the same time. Once reached, a new browser will be launched to handle the excess.

optionaloperationTimeoutSecs

operationTimeoutSecs?: number = <p>15</p>

As we know from experience, async operations of the underlying libraries, such as launching a browser or opening a new page, can get stuck. To prevent BrowserPool from getting stuck, we add a timeout to those operations and you can configure it with this option.

optionalretireBrowserAfterPageCount

retireBrowserAfterPageCount?: number = <p>100</p>

Browsers tend to get bloated after processing a lot of pages. This option configures the number of processed pages after which the browser will automatically retire and close. A new browser will launch in its place.

optionaluseFingerprints

useFingerprints?: boolean = <p>true</p>