Skip to content

Additional Chrome flag recommendations #550

@KieranP

Description

@KieranP

Have added the following extra browser flags for Chrome. They disable a bunch of stuff that isn't needed when just loading HTML and exporting to a PDF (things like updating browser components, info bars, desktop notifications, etc). It cuts a tiny amount of time off the startup. I'd suggest adding them as defaults to Ferrum:

# Build on top of https://github.com/rubycdp/ferrum/blob/main/lib/ferrum/browser/options/chrome.rb
browser_options = {
  'allow-pre-commit-input' => nil,
  'disable-component-update' => nil,
  'disable-crash-reporter' => nil,
  'disable-features' => %w[
    AcceptCHFrame
    HttpsUpgrades
    InterestFeedContentSuggestion
    IsolateOrigins
    MediaRouter
    OptimizationHints
    Translate
  ].join(","),
  'disable-field-trial-config' => nil,
  'disable-infobars' => nil,
  'disable-notifications' => nil,
  'disable-search-engine-choice-screen' => nil,
  'disable-smooth-scrolling' => nil,
  'no-default-browser-check' => nil,
  'no-pings' => nil,
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions