Chrome command line options flags

General Flags

  1. –headless
    Run Chrome in headless mode (no UI). Useful for automation, CI/CD, etc.

chrome –headless

  1. –disable-extensions
    Disables all Chrome extensions.

chrome –disable-extensions

  1. –start-maximized
    Launch Chrome in a maximized window.

chrome –start-maximized

  1. –disable-gpu
    Disable hardware acceleration for GPU. Useful in headless mode.

chrome –disable-gpu

  1. –disable-software-rasterizer
    Disables the software rasterizer for Chrome.

chrome –disable-software-rasterizer

  1. –disable-translate
    Disables the automatic translation feature in Chrome.

chrome –disable-translate

  1. –incognito
    Start Chrome in incognito mode, which disables browsing history and cookies.

chrome –incognito

  1. –remote-debugging-port=9222
    Starts Chrome with remote debugging enabled on the specified port.

chrome –remote-debugging-port=9222

  1. –disable-web-security
    Disables the same-origin policy and other security features, useful for local development.

chrome –disable-web-security

  1. –allow-insecure-localhost
    Allows insecure localhost connections (useful when testing locally).

chrome –allow-insecure-localhost

  1. –disable-extensions
    Disables all Chrome extensions.

chrome –disable-extensions

  1. –no-sandbox
    Disables the sandbox security model, used in some environments like Docker or CI/CD pipelines.

chrome –no-sandbox

  1. –disable-notifications
    Disables notifications in Chrome.

chrome –disable-notifications

Security & Privacy Flags

  1. –disable-webgl
    Disables WebGL (useful in compatibility testing).

chrome –disable-webgl

  1. –incognito
    Launches Chrome in incognito mode, disabling history and caching.

chrome –incognito

  1. –disable-cookies
    Disables cookies in the browser.

chrome –disable-cookies

  1. –disable-plugins
    Disables plugins (e.g., Flash).

chrome –disable-plugins

  1. –disable-popup-blocking
    Disables popup blocking for new windows and dialogs.

chrome –disable-popup-blocking

  1. –disable-safe-browsing
    Disables Chrome’s Safe Browsing feature for testing potentially unsafe sites.

chrome –disable-safe-browsing

  1. –no-referrers
    Disables sending referrer information with requests.

chrome –no-referrers

  1. –ignore-certificate-errors
    Ignores SSL certificate errors. Useful when working with self-signed certificates.

chrome –ignore-certificate-errors

Performance Flags

  1. –disable-hardware-acceleration
    Disables hardware acceleration for rendering.

chrome –disable-hardware-acceleration

  1. –disable-logging
    Disables all logging in Chrome.

chrome –disable-logging

  1. –disk-cache-size=104857600
    Sets the disk cache size in bytes (e.g., 100 MB).

chrome –disk-cache-size=104857600

  1. –reduce-memory-usage
    Attempts to reduce Chrome’s memory usage.

chrome –reduce-memory-usage

  1. –single-process
    Runs Chrome in a single process, useful for debugging.

chrome –single-process

  1. –no-sandbox
    Disables sandbox security model (useful in certain testing environments like Docker).

chrome –no-sandbox

Developer Tools & Debugging

  1. –enable-logging
    Enables logging of detailed information for debugging.

chrome –enable-logging

  1. –v=1
    Sets the verbosity of logging.

chrome –v=1

  1. –remote-debugging-port=9222
    Starts Chrome with remote debugging enabled.

chrome –remote-debugging-port=9222

  1. –autoplay-policy=no-user-gesture-required
    Allows autoplay of media without user interaction.

chrome –autoplay-policy=no-user-gesture-required

Web Features

  1. –enable-experimental-web-platform-features
    Enables experimental web platform features (e.g., new web standards).

chrome –enable-experimental-web-platform-features

  1. –enable-blink-features=AutomationControlled
    Enables specific Blink features related to automated testing.

chrome –enable-blink-features=AutomationControlled

  1. –disable-background-timer-throttling
    Disables throttling of background timers (may help with performance testing).

chrome –disable-background-timer-throttling

  1. –disable-backgrounding-occluded-windows
    Disables backgrounding of hidden windows for performance.

chrome –disable-backgrounding-occluded-windows

  1. –disable-features=TranslateUI
    Disables the Google Translate UI feature.

chrome –disable-features=TranslateUI

UI/Visual Configuration

  1. –force-device-scale-factor=1
    Force a specific device scale factor (e.g., useful for testing mobile scaling).

chrome –force-device-scale-factor=1

  1. –window-size=1920×1080
    Set the window size of Chrome when it launches.

chrome –window-size=1920×1080

  1. –disable-animations
    Disables  animations for performance testing.

chrome –disable-animations

  1. –start-fullscreen
    Launch Chrome in full-screen mode.

chrome –start-fullscreen

  1. –window-position=0,0
    Set the starting position of Chrome’s window.

chrome –window-position=0,0

  1. –hide-scrollbars
    Hides scrollbars in the Chrome window.

chrome –hide-scrollbars

Miscellaneous Flags

  1. –disable-accelerated-2d-canvas
    Disables accelerated 2D canvas rendering.

chrome –disable-accelerated-2d-canvas

  1. –force-dark-mode
    Forces Chrome to use dark mode UI.

chrome –force-dark-mode

  1. –enable-features=FeatureName
    Enables specific Chrome features by name (e.g., experimental features).

chrome –enable-features=NewTabPage

  1. –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.