In Puppeteer, set the user agent on the page before you navigate: call page.setUserAgent(), then page.goto(). For a manual test, use Chrome DevTools’ Network conditions panel to disable the browser default and enter a custom value. A user-agent override changes what a site is told about the browser; it does not turn Chrome into another browser or change Chrome’s internal behavior.
Change the user agent with Puppeteer
Set the override before navigation so the initial request uses it. Puppeteer’s current Page.setUserAgent(options) API accepts a configuration object with optional userAgent, userAgentMetadata, and platform fields.
As an Amazon Associate I earn from qualifying purchases.
Set a custom string
This runnable example launches Chrome in headless mode, applies a string override, navigates to the target, and prints the resulting page title. Install Puppeteer in your project first; replace the sample string and URL with values appropriate to your test.
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch({ headless: true });
try {
const page = await browser.newPage();
await page.setUserAgent({
userAgent: 'your target user-agent string'
});
await page.goto('https://example.com', { waitUntil: 'domcontentloaded' });
console.log(await page.title());
} finally {
await browser.close();
}
})();
Use a realistic value for the exact browser or device scenario you are testing rather than assuming any arbitrary string represents a complete browser emulation. Check the request and page-visible values after navigation.
#1 Best Overall
- SLIM. LIGHTWEIGHT. READY TO GO: The all-new slim design is perfect for busy lives on the go.
- SKILLFULLY DESIGNED. MILITARY TOUGH: Built with premium craftsmanship to withstand the occasional drop or ding.
- ALL-DAY, ALL-IN-ONE CHARGING: Power through your school day – and beyond – with a long-lasting 12-hour battery.¹
- 3X FASTER THAN THE PREVIOUS GENERATION OF WIFI: Crush your schoolwork in record time with Wi-Fi that’s three times faster than the previous generation of Wi-Fi.
- YOUR PHONE AND CHROMEBOOK WORK BETTER TOGETHER: Easily transfer files between devices, and control your phone right from your Chromebook.
Include metadata or a platform when the test needs them
A site may inspect User-Agent Client Hints as well as the legacy user-agent string. If the intended scenario requires those signals to align, provide the corresponding metadata and platform fields supported by your Puppeteer version:
await page.setUserAgent({
userAgent: 'your target user-agent string',
userAgentMetadata: { /* values for the target scenario */ },
platform: 'target platform'
});
await page.goto('https://example.com');
The object values depend on the scenario; do not copy generic metadata into a test without checking that it matches the browser and platform you mean to represent. Verify the outgoing request headers and values visible to page JavaScript in the actual browser and Puppeteer versions you run.
Rank #2
- Intel Processor Up to 2.80GHz, 4GB DDR4, 128GB Storage
- 15" FHD IPS Display, Intel UHD Graphics
- 1x USB Type C, 1 x USB Type A, 1x Headphone/Microphone Combo Jack, HDMI
- Super Fast WiFi and Bluetooth, Integrated Webcam
- Chrome OS, AC Charger Included, Pastel Blue
Set a user agent manually in Chrome DevTools
- Open DevTools, then open Network conditions from the Network panel, or find Network conditions using the DevTools command menu.
- Under User agent, turn off Use browser default.
- Choose a preset or enter the custom user-agent string you want to test.
- If the test also depends on client hints, open the user-agent client hints controls, edit the values, and apply them.
- Reload the page, then inspect the request and the page’s behavior.
Chrome’s documented override changes how Chrome identifies itself to web servers and can affect the content served. It does not change how Chrome functions internally. DevTools controls the user-agent string and client-hints values separately, so changing one should not be assumed to update the other.
Choose between a string override and device emulation
Use a string override when the question is specifically how a site responds to a particular user-agent string. It does not reproduce another browser engine or, by itself, establish a device’s screen dimensions.
Rank #3
- Storage: 16GB Flash Memory
- OS: Chrome OS
- Screen Size: 11.6"
For a known device scenario, Puppeteer’s page.emulate(device) combines device metrics and a user agent. Emulate before navigation: a page may not expect its dimensions to change after it has loaded. Consider the intended device’s user agent, viewport, and relevant client hints together when deciding whether device emulation is a better fit than a string-only override.
What the override does—and what it does not
Current Chrome Headless mode shares the browser implementation with headful Chrome. The separate older implementation is available as chrome-headless-shell; it is not the ordinary current Headless mode. There is no special Headless-only user-agent setting in the documented workflow: configure the value through DevTools or the automation API.
Rank #4
- FOR HOME, WORK, & SCHOOL – With an Intel processor, 14-inch display, custom-tuned stereo speakers, and long battery life, this Chromebook laptop lets you knock out any assignment or binge-watch your favorite shows..Voltage:5.0 volts
- HD DISPLAY, PORTABLE DESIGN – See every bit of detail on this micro-edge, anti-glare, 14-inch HD (1366 x 768) display (1); easily take this thin and lightweight laptop PC from room to room, on trips, or in a backpack.
- ALL-DAY PERFORMANCE – Reliably tackle all your assignments at once with the quad-core, Intel Celeron N4120—the perfect processor for performance, power consumption, and value (2).
- 4K READY – Smoothly stream 4K content and play your favorite next-gen games with Intel UHD Graphics 600 (3) (4).
- MEMORY AND STORAGE – Enjoy a boost to your system’s performance with 4 GB of RAM while saving more of your favorite memories with 64 GB of reliable flash-based eMMC storage (5).
A user-agent string is only one browser-identification signal. Sites can also use request headers such as Sec-CH-UA, Sec-CH-UA-Mobile, and Sec-CH-UA-Platform, or read navigator.userAgentData in JavaScript. A test that changes only the legacy string may therefore leave other signals inconsistent.
Recommended Free Tools
Verify the result and troubleshoot mismatches
- The first request still has the original value: apply the override before
page.goto()and then make a fresh navigation. Setting it after a page has already loaded does not change the request that has already happened. - The site still serves the same content: confirm that the site actually varies its response based on the signal you changed. It may rely on client hints, JavaScript-visible values, viewport dimensions, or other signals instead of the legacy string alone.
- Request headers and JavaScript values disagree: inspect both the request and the values the page reads. Configure the relevant client-hints metadata when needed, and validate the behavior using the actual Chrome and Puppeteer versions in the test.
- The site’s mobile layout does not appear: a user-agent string alone does not change viewport or device metrics. Use device emulation for a device-level test, and apply it before navigation.
- The test results change between Headless environments: record whether the run uses current Chrome Headless or
chrome-headless-shell; they are distinct implementations.
Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server. Its API accepts a custom user agent, which can help when you need a screenshot from a request configured for a particular user-agent scenario; it does not replace checking client hints or other browser signals required by a full compatibility test.
One GET request returns a screenshot or PDF. For example, capture a page using the API’s custom user-agent parameter:
curl -G "https://api.screenshotneo.com/v1/shot"
-d access_key=YOUR_API_KEY
--data-urlencode url=https://example.com
-d user_agent='your target user-agent string'
-o shot.webp
See the ScreenshotNeo API documentation for request parameters. Before capture, it accepts cookie or consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each of those steps can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and responses identify the page verdict and billing status in headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents.
The Free plan includes 1,000 shots per month without a card; paid plans start at $5 for 3,000 shots. Sign up for ScreenshotNeo and get 1,000 free screenshots a month with no card.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteQuick 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.




