Chrome Flags Reference

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

--disk-cache-size

What does --disk-cache-size do?

Forces the maximum disk space to be used by the disk cache, in bytes.

Usage

CLILaunch Chrome with --disk-cache-size using CLI

chrome --disk-cache-size

PuppeteerLaunch Chrome with --disk-cache-size using Puppeteer

const browser = await puppeteer.launch({
  args: ['--disk-cache-size']
});

PlaywrightLaunch Chrome with --disk-cache-size using Playwright

const browser = await chromium.launch({
  args: ['--disk-cache-size']
});

SeleniumLaunch Chrome with --disk-cache-size using Selenium

from selenium import webdriver

options = webdriver.ChromeOptions()
options.add_argument('--disk-cache-size')

driver = webdriver.Chrome(options=options)