Skip to content

Commit 0323cc7

Browse files
committed
Update flags documentation
1 parent 576f334 commit 0323cc7

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

docs/chrome-flags-for-tools.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Here's a **[Nov 2022 comparison of what flags](https://docs.google.com/spreadshe
3636

3737
* `--aggressive-cache-discard`
3838
* `--allow-running-insecure-content`
39-
* `--disable-back-forward-cache`: Disables the BackForwardCache feature.
39+
* `--disable-back-forward-cache`: Disables the BackForwardCache feature to avoids surprises like main request not being intercepted during page.goBack().
4040
* `--disable-features=AcceptCHFrame`: Disable accepting h2/h3 [ACCEPT_CH](https://datatracker.ietf.org/doc/html/draft-davidben-http-client-hint-reliability-02#section-4.3) Client Hints frames.
4141
* `--disable-features=AutoExpandDetailsElement`: Removed in [Sept 2022](https://bugs.chromium.org/p/chromium/issues/detail?id=1185950#c62).
4242
* `--disable-features=AvoidUnnecessaryBeforeUnloadCheckSync`: If enabled, this feature results in the browser process only asking the renderer process to run beforeunload handlers if it knows such handlers are registered. With `kAvoidUnnecessaryBeforeUnloadCheckSync`, content does not report a beforeunload handler is present. A ramification of this is navigations that would normally check beforeunload handlers before continuing will not, and navigation will synchronously continue.
@@ -45,6 +45,7 @@ Here's a **[Nov 2022 comparison of what flags](https://docs.google.com/spreadshe
4545
* `--disable-features=IsolateOrigins`
4646
* `--disable-features=LazyFrameLoading`
4747
* `--disable-features=ScriptStreaming`: V8 script streaming
48+
* `--disable-field-trial-config`: See https://source.chromium.org/chromium/chromium/src/+/main:testing/variations/README.md
4849
* `--no-process-per-site`: Disables renderer process reuse (across tabs of the same site).
4950
* `--enable-precise-memory-info`: Make the values returned to window.performance.memory more granular and more up to date in shared worker. Without this flag, the memory information is still available, but it is bucketized and updated less frequently. This flag also applys to workers.
5051
* `--js-flags=--random-seed=1157259157`: Initialize V8's RNG with a fixed seed.
@@ -54,7 +55,7 @@ Here's a **[Nov 2022 comparison of what flags](https://docs.google.com/spreadshe
5455

5556
## Interactivity suppression
5657

57-
* `--autoplay-policy=...`: Value of `user-gesture-required` to not autoplay video. Value of `no-user-gesture-required` to always autoplay video.
58+
* `--autoplay-policy=`: Value of `user-gesture-required` to not autoplay video. Value of `no-user-gesture-required` to always autoplay video.
5859
* `--deny-permission-prompts`: Suppress all permission prompts by automatically denying them.
5960
* `--disable-external-intent-requests`: Disallow opening links in external applications
6061
* `--disable-features=GlobalMediaControls`: Hide toolbar button that opens dialog for controlling media sessions.
@@ -74,7 +75,7 @@ Here's a **[Nov 2022 comparison of what flags](https://docs.google.com/spreadshe
7475
- disables auto-reloading on network errors ([source](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/chrome_content_browser_client.cc;l=1328-1331;drc=1e6c1a39cbbc1dcad6e7828661d74d76463465ed))
7576
- enables the CDP method [`Browser.getBrowserCommandLine`](https://chromedevtools.github.io/devtools-protocol/tot/Browser/#method-getBrowserCommandLine).
7677
- avoids showing these 4 infobars: ShowBadFlagsPrompt, GoogleApiKeysInfoBarDelegate, ObsoleteSystemInfoBarDelegate, LacrosButterBar
77-
- adds this infobar: ![image](https://user-images.githubusercontent.com/39191/30349667-92a7a086-97c8-11e7-86b2-1365e3d407e3.png) ... which is known to [adversely affect screenshots](https://bugs.chromium.org/p/chromium/issues/detail?id=1277272).
78+
- adds this infobar: ![image](https://user-images.githubusercontent.com/39191/30349667-92a7a086-97c8-11e7-86b2-1365e3d407e3.png) which is known to [adversely affect screenshots](https://bugs.chromium.org/p/chromium/issues/detail?id=1277272).
7879
* `--test-type`: Basically the 2014 version of `--enable-automation`. [codesearch](https://cs.chromium.org/search/?q=kTestType%5Cb&type=cs)
7980
- It avoids creating application stubs in ~/Applications on mac.
8081
- It makes exit codes slightly more correct
@@ -84,28 +85,28 @@ Here's a **[Nov 2022 comparison of what flags](https://docs.google.com/spreadshe
8485
- "Component extensions with background pages are not enabled during tests because they generate a lot of background behavior that can interfere."
8586
- when quitting the browser, it disables additional checks that may stop that quitting process. (like unsaved form modifications or unhandled profile notifications..)
8687
* `--remote-debugging-pipe`: more secure than using protocol over a websocket
87-
* `--remote-debugging-port=...`: With a value of 0, Chrome will automatically select a useable port _and_ will set `navigator.webdriver` to `true`.
88+
* `--remote-debugging-port=`: With a value of 0, Chrome will automatically select a useable port _and_ will set `navigator.webdriver` to `true`.
8889
* `--silent-debugger-extension-api`: Does not show an infobar when a Chrome extension attaches to a page using `chrome.debugger` page. Required to attach to extension background pages.
8990

9091
## General
9192

9293
* `--enable-logging=stderr`: Logging behavior slightly more appropriate for a server-type process.
9394
* `--log-level=0`: 0 means INFO and higher. `2` is the most verbose. Protip: Use `--enable-logging=stderr --v=2` and you may spot additional components active that you may want to disable.
94-
* `--user-data-dir=...`: Directory where the browser stores the user profile.
95+
* `--user-data-dir=`: Directory where the browser stores the user profile.
9596

9697
## Chromium Annoyances
9798

9899
* `--disable-features=MediaRouter`: Avoid the startup dialog for _Do you want the application “Chromium.app” to accept incoming network connections?_. Also disables the [Chrome Media Router](https://chromium.googlesource.com/chromium/src/+/HEAD/docs/media/media_router.md) which creates background networking activity to discover cast targets. A superset of disabling `DialMediaRouteProvider`.
99100
* `--password-store=basic`: Avoid potential instability of using Gnome Keyring or KDE wallet. [chromium/linux/password_storage.md](https://chromium.googlesource.com/chromium/src/+/main/docs/linux/password_storage.md) https://crbug.com/571003
100-
* `--use-mock-keychain`: Use mock keychain on Mac to prevent the blocking permissions dialog abou: _Chrome wants to use your confidential information stored in your keychain_
101+
* `--use-mock-keychain`: Use mock keychain on Mac to prevent the blocking permissions dialog asking: _Do you want the application “Chromium.app” to accept incoming network connections?_
101102

102103
## Background networking
103104

104105
* `--disable-background-networking`: Disable various background network services, including extension updating,safe browsing service, upgrade detector, translate, UMA
105106
* `--disable-breakpad`: Disable crashdump collection (reporting is already disabled in Chromium)
106-
* `--disable-component-update`: Don't update the browser 'components' listed at chrome://components/
107+
* `--disable-component-update`: Don't update the browser 'components' listed at chrome://components/ after startup as it creates lots of network activity.
107108
* `--disable-domain-reliability`: Disables Domain Reliability Monitoring, which tracks whether the browser has difficulty contacting Google-owned sites and uploads reports to Google.
108-
* `--disable-features=AutofillServerCommunication`: Disables autofill server communication. This feature isn't disabled via other 'parent' flags.
109+
* `--disable-features=AutofillServerCommunication`: Disables (mostly for hermetic testing) autofill server communication. The URL of the autofill server can further be controlled via the autofill-server-url param. The given URL should specify the complete autofill server API url up to the parent "directory" of the "query" and "upload" resources. i.e., https://other.autofill.server:port/tbproxy/af/
109110
* `--disable-features=CertificateTransparencyComponentUpdater`
110111
* `--disable-sync`: Disable syncing to a Google account
111112
* `--enable-crash-reporter-for-testing`: Used for turning on Breakpad crash reporting in a debug environment where crash reporting is typically compiled but disabled.
@@ -195,7 +196,7 @@ If you wanted to launch a fresh Chrome profile **_with_** some Preferences set,
195196
mkdir -p your_empty_user_data_dir/Default/
196197
echo '{"devtools":{"preferences":{"jsSourceMapsEnabled":"false","cssSourceMapsEnabled":"false"}}}' > your_empty_user_data_dir/Default/Preferences
197198

198-
chrome --user-data-dir=your_empty_user_data_dir ...
199+
chrome --user-data-dir=your_empty_user_data_dir
199200
```
200201

201202
## Feature Flags FYI

0 commit comments

Comments
 (0)