October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk3 min

Puppeteer Cookie Source Scheme: What It Means

Puppeteer’s sourceScheme records the origin scheme associated with a cookie’s source. Learn its three values, how it differs from secure, and Chrome support caveats.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

In Puppeteer, sourceScheme records the scheme of the origin that originally set a cookie. It is metadata about the cookie’s source, not another name for the cookie’s Secure flag. Puppeteer documents three values: Unset, NonSecure, and Secure.

What sourceScheme means

Puppeteer describes CookieSourceScheme as the source scheme of the origin that originally set the cookie. In other words, the field characterizes the cookie’s originating context; it is distinct from the cookie’s own security attribute. The field is optional in Puppeteer’s cookie-setting and cookie-data types, and Puppeteer documents it as supported only in Chrome. Puppeteer’s CookieSourceScheme reference defines the type, while the CookieParam reference and CookieData reference describe the API fields.

As an Amazon Associate I earn from qualifying purchases.

What the three values indicate

Value Meaning and practical note
Secure Indicates a secure source scheme for the origin associated with the cookie’s source. It does not mean the same thing as setting the cookie’s separate secure property to true.
NonSecure Indicates a non-secure source scheme for the origin associated with the cookie’s source.
Unset A temporary compatibility value that lets protocol clients emulate legacy cookie scope for the scheme. Puppeteer says this ability will be removed in the future, so do not treat it as a durable default.

The Chrome DevTools Protocol also marks sourceScheme experimental. Its live protocol definition can change: Network.pdl.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

sourceScheme versus secure

These are separate cookie properties. secure is the cookie’s Secure flag; sourceScheme describes the scheme of the origin associated with where the cookie was originally set. The protocol defines them independently, so setting one should not be understood as setting or overriding the other. The cited references do not establish that sourceScheme alone determines whether a cookie is sent with a request.

Setting a cookie in Puppeteer

A setting URL can affect default cookie values for domain, path, and source scheme. For ordinary use, let the setting context establish appropriate defaults unless you have a specific protocol-level reason to provide sourceScheme explicitly.

await page.setCookie({
  name: 'session',
  value: 'example',
  url: 'https://example.test',
  secure: true,
  sourceScheme: 'Secure',
});

This is an illustrative example of the API shape, not a claim that the code has been executed. The field’s availability is Chrome-only in Puppeteer’s documentation; check the exact Puppeteer and Chrome versions used by your application before relying on it.

When to inspect the field

  • If a cookie object received from Chrome or a protocol-level API includes sourceScheme, read it as information about the scheme of the origin that originally set that cookie.
  • If you explicitly set it, confirm that the Chrome and Puppeteer versions in your environment support the property.
  • If cookie behavior is unexpected, inspect the independent cookie properties too: secure, sameSite, domain, path, and the URL used to set the cookie. The cited documentation does not say sourceScheme overrides these fields.

Or skip the browser setup

If your goal is to capture a page rather than inspect Puppeteer cookie metadata, ScreenshotNeo provides a website screenshot API and MCP server. A single GET request can return an image or PDF. Its API accepts cookie and request settings, but it is not a replacement for Puppeteer’s cookie APIs or a way to inspect sourceScheme.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a screenshot, this cURL call saves the result as a WebP file. See the ScreenshotNeo API documentation for request options.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
  • Cookie banners are accepted and removed, along with known newsletter popups and chat widgets, before capture; each step can be turned off.
  • Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing; response headers report the page verdict and whether the request was billed.
  • An MCP server provides screenshot tools for AI agents, including Claude, Cursor, and other MCP clients.
  • The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots.

Sign up for 1,000 free screenshots a month—no card required.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Frequently Asked Questions

Is sourceScheme required when setting a Puppeteer cookie?

No. Puppeteer documents it as optional; a setting URL can affect its default value.

Does sourceScheme: 'Secure' set the cookie’s Secure flag?

No. The source-scheme field and the cookie’s secure flag are distinct properties.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Can I rely on Unset for new code?

It is described as a temporary legacy-compatibility ability that will be removed, so it is not a durable default.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.