Chrome command line options flags
General Flags
- –headless
Run Chrome in headless mode (no UI). Useful for automation, CI/CD, etc.
chrome –headless
- –disable-extensions
Disables all Chrome extensions.
chrome –disable-extensions
- –start-maximized
Launch Chrome in a maximized window.
chrome –start-maximized
- –disable-gpu
Disable hardware acceleration for GPU. Useful in headless mode.
chrome –disable-gpu
- –disable-software-rasterizer
Disables the software rasterizer for Chrome.
chrome –disable-software-rasterizer
- –disable-translate
Disables the automatic translation feature in Chrome.
chrome –disable-translate
- –incognito
Start Chrome in incognito mode, which disables browsing history and cookies.
chrome –incognito
- –remote-debugging-port=9222
Starts Chrome with remote debugging enabled on the specified port.
chrome –remote-debugging-port=9222
- –disable-web-security
Disables the same-origin policy and other security features, useful for local development.
chrome –disable-web-security
- –allow-insecure-localhost
Allows insecure localhost connections (useful when testing locally).
chrome –allow-insecure-localhost
- –disable-extensions
Disables all Chrome extensions.
chrome –disable-extensions
- –no-sandbox
Disables the sandbox security model, used in some environments like Docker or CI/CD pipelines.
chrome –no-sandbox
- –disable-notifications
Disables notifications in Chrome.
chrome –disable-notifications
Security & Privacy Flags
- –disable-webgl
Disables WebGL (useful in compatibility testing).
chrome –disable-webgl
- –incognito
Launches Chrome in incognito mode, disabling history and caching.
chrome –incognito
- –disable-cookies
Disables cookies in the browser.
chrome –disable-cookies
- –disable-plugins
Disables plugins (e.g., Flash).
chrome –disable-plugins
- –disable-popup-blocking
Disables popup blocking for new windows and dialogs.
chrome –disable-popup-blocking
- –disable-safe-browsing
Disables Chrome’s Safe Browsing feature for testing potentially unsafe sites.
chrome –disable-safe-browsing
- –no-referrers
Disables sending referrer information with requests.
chrome –no-referrers
- –ignore-certificate-errors
Ignores SSL certificate errors. Useful when working with self-signed certificates.
chrome –ignore-certificate-errors
Performance Flags
- –disable-hardware-acceleration
Disables hardware acceleration for rendering.
chrome –disable-hardware-acceleration
- –disable-logging
Disables all logging in Chrome.
chrome –disable-logging
- –disk-cache-size=104857600
Sets the disk cache size in bytes (e.g., 100 MB).
chrome –disk-cache-size=104857600
- –reduce-memory-usage
Attempts to reduce Chrome’s memory usage.
chrome –reduce-memory-usage
- –single-process
Runs Chrome in a single process, useful for debugging.
chrome –single-process
- –no-sandbox
Disables sandbox security model (useful in certain testing environments like Docker).
chrome –no-sandbox
Developer Tools & Debugging
- –enable-logging
Enables logging of detailed information for debugging.
chrome –enable-logging
- –v=1
Sets the verbosity of logging.
chrome –v=1
- –remote-debugging-port=9222
Starts Chrome with remote debugging enabled.
chrome –remote-debugging-port=9222
- –autoplay-policy=no-user-gesture-required
Allows autoplay of media without user interaction.
chrome –autoplay-policy=no-user-gesture-required
Web Features
- –enable-experimental-web-platform-features
Enables experimental web platform features (e.g., new web standards).
chrome –enable-experimental-web-platform-features
- –enable-blink-features=AutomationControlled
Enables specific Blink features related to automated testing.
chrome –enable-blink-features=AutomationControlled
- –disable-background-timer-throttling
Disables throttling of background timers (may help with performance testing).
chrome –disable-background-timer-throttling
- –disable-backgrounding-occluded-windows
Disables backgrounding of hidden windows for performance.
chrome –disable-backgrounding-occluded-windows
- –disable-features=TranslateUI
Disables the Google Translate UI feature.
chrome –disable-features=TranslateUI
UI/Visual Configuration
- –force-device-scale-factor=1
Force a specific device scale factor (e.g., useful for testing mobile scaling).
chrome –force-device-scale-factor=1
- –window-size=1920×1080
Set the window size of Chrome when it launches.
chrome –window-size=1920×1080
- –disable-animations
Disables animations for performance testing.
chrome –disable-animations
- –start-fullscreen
Launch Chrome in full-screen mode.
chrome –start-fullscreen
- –window-position=0,0
Set the starting position of Chrome’s window.
chrome –window-position=0,0
- –hide-scrollbars
Hides scrollbars in the Chrome window.
chrome –hide-scrollbars
Miscellaneous Flags
- –disable-accelerated-2d-canvas
Disables accelerated 2D canvas rendering.
chrome –disable-accelerated-2d-canvas
- –force-dark-mode
Forces Chrome to use dark mode UI.
chrome –force-dark-mode
- –enable-features=FeatureName
Enables specific Chrome features by name (e.g., experimental features).
chrome –enable-features=NewTabPage
- –disable-dev-shm-usage
Prevents usage of /dev/shm for temporary files. Can be helpful in Docker environments.
chrome –disable-dev-shm-usage
Example Usage of Chrome Flags
Here’s an example of launching Chrome with multiple flags via the command line:
chrome –headless –disable-gpu –window-size=1920×1080 –remote-debugging-port=9222 –incognito
This command will launch Chrome in headless mode, disable GPU hardware acceleration, set the window size, enable remote debugging on port 9222, and start Chrome in incognito mode.
No images available.