Chrome Flags Reference

Chrome command line switches and startup flags for automation, headless mode, and debugging.

--shared-files

What does --shared-files do?

Describes the file descriptors passed to a child process in the following list format: <file_id>:<descriptor_id>,<file_id>:<descriptor_id>,... where <file_id> is an ID string from the manifest of the service being launched and <descriptor_id> is the numeric identifier of the descriptor for the child process can use to retrieve the file descriptor from the global descriptor table.

Usage

CLILaunch Chrome with --shared-files using CLI

chrome --shared-files

PuppeteerLaunch Chrome with --shared-files using Puppeteer

const browser = await puppeteer.launch({
  args: ['--shared-files']
});

PlaywrightLaunch Chrome with --shared-files using Playwright

const browser = await chromium.launch({
  args: ['--shared-files']
});

SeleniumLaunch Chrome with --shared-files using Selenium

from selenium import webdriver

options = webdriver.ChromeOptions()
options.add_argument('--shared-files')

driver = webdriver.Chrome(options=options)

Build Conditions

LOAD_WEBUI_FROM_DISK