Skip to content

Commit 092465e

Browse files
committed
Disable background networking noise in Chrome
This avoids the annoying DNS lookups, but also various other requests which create extra traffic you don't want. There are reports (Cypress) that it once caused issues with XHR delays (many years ago) but it's on by default for Puppeteer, TestCafe & others, so I suspect it's fine nowadays.
1 parent 3d02e74 commit 092465e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/interceptors/chromium-based-interceptors.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ const getChromiumLaunchOptions = async (
4545
],
4646
options: [
4747
// Trust our CA certificate's fingerprint:
48-
`--ignore-certificate-errors-spki-list=${spkiFingerprint}`
48+
`--ignore-certificate-errors-spki-list=${spkiFingerprint}`,
49+
// Avoid annoying extra network noise:
50+
'--disable-background-networking'
4951
]
5052
};
5153
}

0 commit comments

Comments
 (0)