Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minuteTo see the request headers and cookies Chrome actually sends, enable the Chrome DevTools Protocol (CDP) Network domain before navigation and listen for Network.requestWillBeSentExtraInfo. Join that event to Network.requestWillBeSent by requestId; the extra-info event may arrive first or later. For a page’s current cookie jar, query Network.getCookies with the page URL. Playwright and Puppeteer can expose this data too, but browser-managed headers such as Cookie may be added immediately before transmission.
Choose the right way to inspect traffic
Use CDP when you need the most detailed view of Chrome’s network activity, including raw transmitted request headers, response metadata, and cookies considered for a particular request. Use Playwright’s cookie APIs when the question is “what cookies apply to this URL?” Use Playwright or Puppeteer request and response events when you want an automation-friendly view without implementing the protocol yourself.
| Approach | Best for | Important distinction |
|---|---|---|
| Raw CDP Network events | Inspecting Chrome traffic and request-associated cookie details | requestWillBeSentExtraInfo is the event to inspect for raw request headers as sent. |
| Playwright context cookies and network events | Automation scripts that need the browser cookie jar or request lifecycle | A manually supplied Cookie header on a routed request may be ignored in favor of the browser’s cookie store. |
| Puppeteer interception and network APIs | JavaScript automation using a high-level Chrome API | Convenient for common workflows; raw CDP remains useful for the most detailed metadata. |
Headless is a runtime mode, not a separate kind of cookie store: Chrome can run without a visible window and still maintain cookies for its browser context or profile. Attaching to an already running browser is a different workflow; it can expose that session’s active login state, so use a dedicated profile and protect the captured values.
Capture headers and cookies with Playwright and CDP
This runnable Node.js example uses Playwright’s Chromium CDP session. It enables Network before navigating, stores events by request ID, joins extra-info records regardless of arrival order, prints request headers and cookie details, and then asks Chrome for cookies applicable to the page URL.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11#1 Best Overall
- CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
- WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
- A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
Install and run
-
Install Node.js, then create a project and add Playwright:
npm init -yfollowed bynpm install playwright. -
Save the script below as
inspect-traffic.js. -
Run
node inspect-traffic.js https://example.com. Replace the URL with the page you are authorized to inspect.
const { chromium } = require('playwright');
const target = process.argv[2] || 'https://example.com';
const records = new Map();
function recordFor(requestId) {
if (!records.has(requestId)) {
records.set(requestId, { requestId, events: [] });
}
return records.get(requestId);
}
(async () => {
const browser = await chromium.launch({ headless: true });
const context = await browser.newContext();
const page = await context.newPage();
const cdp = await context.newCDPSession(page);
cdp.on('Network.requestWillBeSent', event => {
const record = recordFor(event.requestId);
record.request = event;
record.events.push('requestWillBeSent');
if (event.redirectResponse) {
record.redirectResponse = event.redirectResponse;
console.log('nRedirect response for', event.request.url,
event.redirectResponse.status);
}
console.log('nRequest:', event.request.method, event.request.url);
});
cdp.on('Network.requestWillBeSentExtraInfo', event => {
const record = recordFor(event.requestId);
record.requestExtraInfo = event;
record.events.push('requestWillBeSentExtraInfo');
console.log('nRaw request headers for requestId', event.requestId);
console.log(event.headers);
console.log('Associated cookies:', event.associatedCookies);
});
cdp.on('Network.responseReceived', event => {
const record = recordFor(event.requestId);
record.response = event;
record.events.push('responseReceived');
console.log('nResponse:', event.response.status, event.response.url);
});
cdp.on('Network.responseReceivedExtraInfo', event => {
const record = recordFor(event.requestId);
record.responseExtraInfo = event;
record.events.push('responseReceivedExtraInfo');
console.log('nRaw response headers for requestId', event.requestId);
console.log(event.headers);
console.log('Blocked Set-Cookie records:', event.blockedCookies);
});
await cdp.send('Network.enable');
try {
await page.goto(target, { waitUntil: 'domcontentloaded', timeout: 30000 });
} catch (error) {
console.error('Navigation did not complete:', error.message);
}
try {
const result = await cdp.send('Network.getCookies', { urls: [target] });
console.log('nCookies applicable to', target);
console.log(result.cookies);
} catch (error) {
console.error('Could not read cookies:', error.message);
}
console.log('nCaptured request IDs:', [...records.keys()]);
await browser.close();
})().catch(error => {
console.error(error);
process.exitCode = 1;
});
CDP describes the Network domain as tracking page network activity, including requests and responses, headers, bodies, and timing. The script logs header objects as Chrome exposes them. Treat them as sensitive: request headers may include authorization credentials, and cookies often grant access to an account.
Understand the event join
requestWillBeSent provides the request URL, method, and request ID. requestWillBeSentExtraInfo provides the headers transmitted and associatedCookies, including cookies that Chrome considered but blocked from sending. The two events are not guaranteed to arrive in a fixed order, which is why the example stores each by ID rather than assuming the extra-info event immediately follows the request event.
Redirects need special care. Chrome can report a redirect response on a later requestWillBeSent event for the same request ID; the example prints that response status. Don’t treat one ID as necessarily one URL for the entire lifecycle. Keep the URL and redirect information from each event if you need a complete redirect chain.
The response events are useful when the question includes what the server returned. responseReceived provides response details; responseReceivedExtraInfo can expose raw response headers and blocked Set-Cookie records. A blocked cookie is not equivalent to a cookie stored in the jar.
Rank #2
- CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
- SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
Get the cookie jar or inspect one request?
These are related but different questions. Network.getCookies with a URL returns cookies applicable to that URL from the current browser context. The associatedCookies field on a request’s extra-info event describes cookie candidates associated with that request and includes blocked-cookie reasons when applicable. Use the latter to understand a particular outgoing request; use the former to examine the current jar’s URL-scoped cookies.
In Playwright, the browser context cookie API is another convenient option:
const cookies = await context.cookies(['https://example.com']);
console.log(cookies);
Call it after navigation or after setting cookies if you want the current context state. The result is not a substitute for examining a particular request’s actual transmitted headers: domain and path scope, secure rules, expiry, partitioning, and browser policy can all affect whether a stored cookie is sent in a given situation.
Use Playwright request events or routing when CDP detail is unnecessary
Playwright’s request and response events are often the simpler choice for application-level logging. For example, register listeners before navigation:
page.on('request', request => {
console.log('Request:', request.method(), request.url());
console.log('Playwright request headers:', request.headers());
});
page.on('response', response => {
console.log('Response:', response.status(), response.url());
});
await page.goto('https://example.com');
These APIs are convenient, but do not assume that a request’s early header view contains every browser-managed header as transmitted. Playwright documents that headers including Cookie, Host, and Accept-Encoding can be attached by the network stack immediately before sending. Its network guide also specifies that a cookie header passed to route.continue() is ignored in favor of the browser’s cookie store. Set cookies through the context or browser cookie APIs when you need Chrome to send them; use CDP extra-info events when you need to observe what was actually sent.
Use Puppeteer for a JavaScript-first Chrome workflow
Puppeteer is a JavaScript library for automating Chrome and Firefox over CDP and WebDriver BiDi. Its documented capabilities include intercepting and modifying network requests and responses, which makes it a reasonable choice when your existing automation is built around Puppeteer. For a quick lifecycle log, add page listeners before navigation:
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #3
- Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
- Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
- Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
- In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
- Ultra-thin bezels: Maximize your viewing experience with thin bezels.
page.on('request', request => {
console.log(request.method(), request.url(), request.headers());
});
page.on('response', response => {
console.log(response.status(), response.url());
});
await page.goto('https://example.com');
For CDP-level request and cookie metadata in Puppeteer, create a CDP session for the page target, enable Network, and subscribe to the same CDP events described above. Event names and payloads are protocol concepts rather than a Puppeteer-specific abstraction, so the request-ID correlation and late-arriving extra-info handling still matter.
Run headless Chrome or attach to an existing session
Launch a new headless browser
Chrome’s configuration documentation uses the --headless flag to run without a visible browser window. Playwright and Puppeteer also offer headless launch modes, as shown in the examples. Start with a fresh context for reproducibility; it avoids unintentionally mixing the test with another browser profile’s logins and cookies.
Attach to a browser that is already running
Chrome can be connected to through a remote debugging endpoint, and its documentation also describes connecting with --browser-url. An attached browser session can carry its existing cookies and login state. Only attach to a browser you control, restrict access to its debugging endpoint, and avoid printing or sharing session values. If the task is to inspect an existing authenticated session, use a dedicated profile and close or disconnect it when finished.
Common problems and fixes
-
No request extra-info event appears: confirm
Network.enableran before navigation and that the CDP session is attached to the page target generating the traffic. Verify that the navigation reached the request stage rather than failing before any request.DriversOutdated Drivers Are Slowing You DownPerformanceWindows Errors? Fix Them Before They SpreadDriversCrashes, No Sound, or Screen Glitches?Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy. -
The extra-info event arrived before the request event: this is allowed. Buffer both events by
requestId; don’t discard an extra-info record just because its matching request has not appeared yet. -
A cookie is in the jar but absent from the request: inspect
associatedCookiesand any blocked reasons. Check URL scope and applicable browser policy; presence in a cookie listing alone does not prove that Chrome sent it on a particular request.Rank #4
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor- CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
- SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
- MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
- KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
- INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient
-
A manually supplied Cookie header does not take effect: with Playwright routing, its documented behavior is to prefer the browser cookie store over a
cookieheader passed toroute.continue(). Set the cookie in the browser context and inspect the outgoing request instead. -
Response headers or Set-Cookie are missing: listen to
responseReceivedExtraInfoas well asresponseReceived. BlockedSet-Cookieinformation is not the same thing as a cookie accepted into the jar.The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy. -
Redirects make the log look duplicated: preserve each event and inspect
redirectResponse. A redirect can produce multiple URL transitions associated with a request ID; don’t collapse the chain to a single URL. -
Traffic seems absent or incomplete: service workers, cache, redirects, HTTP/2 or HTTP/3, partitioned cookies, and browser policy can affect what you observe. If isolating a test, use a fresh browser context and compare the CDP event stream with the final page behavior.
-
Navigation times out: the example catches navigation failure so that captured events and cookies can still be printed. Check the target URL and browser network access; a timeout does not establish that the page successfully loaded.
Performance, reliability, and safe logging
Network listeners can record many requests, including scripts, images, analytics, and subresources. Filter output to the host, path, or request type you need, and avoid retaining full event payloads longer than necessary. The sample prints data for clarity; for production logs, redact Cookie, Authorization, and other credentials, and consider recording only selected headers and status data.
Best Value
- 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
- 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
- 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.
For repeatable captures, use a fresh context, enable Network before the first navigation, and retain request IDs with timestamps and URLs. Don’t rely on event order, and don’t assume that a browser cache hit or service worker path will look like a new network exchange with an origin server. If results differ between visible and headless runs, compare the browser version, context state, navigation timing, and policies rather than assuming headless mode itself determines cookie behavior.
Or skip the browser setup
If your goal is a clean rendered screenshot rather than inspecting request headers or cookies, ScreenshotNeo is a website screenshot API and MCP server. It is not a replacement for CDP when you need request or cookie data. A single GET request captures a URL as an image or PDF; see the ScreenshotNeo API documentation.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://example.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://example.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
-
Cookie-consent banners, newsletter popups, and chat widgets are removed before the shot; each cleanup step can be turned off.
-
Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and the response reports the page verdict and billing status.
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. -
An MCP server provides
take_screenshot,get_page_info, andcapture_pdftools for AI agents and MCP clients. -
The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots. Every feature is available on every plan.
Sign up for free to get 1,000 screenshots a month with no card.
Frequently Asked Questions
Does headless Chrome have a different cookie jar from visible Chrome?
Headless is a way to run Chrome without a visible window; cookie state belongs to the browser context or profile being used. A new context starts separate from an attached, already authenticated session.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Can ScreenshotNeo show the headers Chrome sent?
No. ScreenshotNeo captures rendered page images or PDFs; use CDP or browser automation APIs when you need network request headers or cookie details.
Quick Recap
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.

