--chromium-preference
- CLI
- --chromium-preference
- REST
- CLI only
Sets a Chromium preference, for browser behavior no command-line switch controls. Repeatable. VALUE is read as the preference’s own type: true or false, a number, or text.
Default Preferences
| Preference | Value | Effect |
|---|---|---|
webrtc. | disable_ | WebRTC sends no UDP and shows a page no address of the host |
net. | 2 | Speculation rules prefetch and prerender nothing |
dns_ | off | Names resolve through the system resolver, the path the IP filter checks |
web_ | false | An application/ response crashes the browser when this is on |
safebrowsing. | false | Safe Browsing is off |
translate. | false | Translate is off |
Errors
Chromium checks each preference when ZShot starts. An invalid preference ends the process with exit code 5.
Set the languages a page sees with --accept-language. Chromium sets intl.accept_languages from it, so that preference has no effect and ZShot warns that it is ignored.
Example
CLI
Run locally
zshot -f page.png \
--chromium-preference webrtc.ip_handling_policy=default \
https://zshot-cli.com/example_assets/hello_zshot/