Recommended Free Tools
Set a Puppeteer page’s user agent with await page.setUserAgent({ userAgent: '…' }) before navigating to the site. This changes the user-agent settings for that page; it does not by itself emulate a complete device profile. If you need a known device’s user agent and viewport together, use page.emulate(device) before navigation.
Set a user agent on a Puppeteer page
In current Puppeteer documentation, Page.setUserAgent takes an options object. Its userAgent field is required; userAgentMetadata and platform are optional. Await the call before navigating or doing work that depends on the override.
import puppeteer from 'puppeteer';
const browser = await puppeteer.launch();
try {
const page = await browser.newPage();
await page.setUserAgent({
userAgent: 'your user-agent string',
});
await page.goto('https://example.com');
// Continue with page work.
} finally {
await browser.close();
}
Replace your user-agent string with a value suitable for the browser and scenario you intend to represent. Puppeteer’s documentation does not establish one universally suitable current string, so do not treat an arbitrary hard-coded browser version as authoritative. See the Page.setUserAgent API.
Choose between a user-agent override and device emulation
| Approach | What it changes | When to use it | Timing |
|---|---|---|---|
page.setUserAgent(options) |
The page’s user-agent settings, with optional metadata and platform fields. | When you specifically need to override user-agent information. | Set it before navigation if the initial request must use the override. |
page.emulate(device) |
A known device profile’s user agent and viewport. | When the viewport as well as the user agent should match a Puppeteer device definition. | Prefer to emulate before navigation; viewport changes can affect a page and may trigger a reload in some cases. |
Puppeteer’s device emulation guide describes page.emulate(device) as a shortcut for setting both user agent and viewport. Device definitions are available through KnownDevices; see the KnownDevices reference. A user-agent string alone should not be assumed to reproduce every characteristic of a real device or browser.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Example: emulate a known device
import puppeteer from 'puppeteer';
import { KnownDevices } from 'puppeteer';
const browser = await puppeteer.launch();
try {
const page = await browser.newPage();
await page.emulate(KnownDevices['iPhone 13']);
await page.goto('https://example.com');
} finally {
await browser.close();
}
Use a device name present in the installed version’s KnownDevices list. If you only need a user-agent override, do not use device emulation as a substitute for a complete browser identity.
Check the browser and page values
browser.userAgent() reports the browser’s original user agent. It is not the page-level override. For page behavior, inspect the page after setting the override:
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
await page.setUserAgent({ userAgent: 'your user-agent string' });
await page.goto('https://example.com');
const pageUserAgent = await page.evaluate(() => navigator.userAgent);
console.log(pageUserAgent);
The API reference documents the page-level call and browser-level method separately: Page.setUserAgent and Browser.userAgent.
Install the right Puppeteer package
The user-agent call is page-level regardless of package choice, but browser setup differs:
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
puppeteerdownloads a compatible Chrome version as part of installation.puppeteer-coredoes not download Chrome. It is suited to setups where you connect to a remote browser or manage browser binaries separately.
Follow the Puppeteer installation guide for package and browser setup details.
Troubleshoot user-agent overrides
- The site still sees the old user agent: Make sure the awaited
page.setUserAgent()call runs on the same page beforepage.goto(). A call on one page does not set another page’s value. - Your code rejects an older positional call: Use the current options-object form shown above, and check the API documentation for your installed Puppeteer version. API signatures can change; a Next documentation page marks a legacy positional signature obsolete. See the Next API reference.
- The layout does not look like a phone: Changing the user agent is not the same as setting a device viewport. Use
page.emulate(device)for a known device’s user agent and viewport. - Emulation changes the page after it loads: Move
page.emulate(device)before navigation where possible; viewport changes may affect page layout and can trigger a reload in some cases. - The browser cannot launch: Check whether your setup uses
puppeteerwith its downloaded compatible Chrome orpuppeteer-corewith a separately managed or remote browser. This is a browser setup issue, not a user-agent setting.
Or skip the browser setup
If your goal is to capture a website rather than control a Puppeteer browser, ScreenshotNeo returns a screenshot or PDF from one GET request. Cookie banners are accepted and removed before the shot, along with known consent platforms, newsletter popups and chat widgets; those cleanup steps can be turned off. Bot checks, blank pages, timeouts, failed loads and cache hits are not billed, and response headers identify the page verdict and billing status. Its MCP server lets AI agents use screenshot, page-info and PDF tools.
Example using cURL; replace the target URL as needed. Full request options are in the ScreenshotNeo documentation.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
ScreenshotNeo includes 1,000 screenshots a month on the free plan with no card; paid plans start at $5 for 3,000 shots. Sign up for free.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Frequently Asked Questions
Does setting a Puppeteer user agent change every page in the browser?
No. page.setUserAgent() is called on a page, so set it separately on each page that needs the override.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Can a user-agent string alone make a page behave exactly like a phone?
No. The documented string override does not establish a complete device profile. Use device emulation when you need a known device’s user agent and viewport together.
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.

