Use Playwright’s page.screenshot() to save the page, and JavaScript’s new Date().toISOString() to record an unambiguous UTC time. Store that time and capture details in a JSON sidecar beside the image. Label whether the timestamp marks the start or completion of the screenshot operation: it is workflow metadata, not a time embedded in the pixels.
Save a full-page screenshot and UTC timestamp
This runnable Node.js example records the time immediately before the screenshot call, so the sidecar accurately calls it the capture start time. It also records the source URL and selected capture settings.
import { chromium } from 'playwright';
import { writeFile } from 'node:fs/promises';
const url = 'https://example.com';
const browser = await chromium.launch();
try {
const page = await browser.newPage();
await page.goto(url, { waitUntil: 'load' });
const captureStartedAt = new Date().toISOString();
await page.screenshot({ path: 'capture.png', fullPage: true });
await writeFile(
'capture.json',
JSON.stringify({
sourceUrl: url,
captureStartedAt,
timestampFormat: 'ISO 8601-style UTC; Z suffix',
screenshot: 'capture.png',
browser: 'Chromium',
playwrightVersion: 'record the installed Playwright version',
screenshotOptions: { fullPage: true },
navigationErrors: []
}, null, 2)
);
} finally {
await browser.close();
}
Install Playwright and its browser before running the script. For an npm project, the basic setup is npm install playwright followed by npx playwright install chromium. Run the file in a Node.js environment configured for ES modules, such as a project with "type": "module" in package.json, or save it with an .mjs extension.
toISOString() returns a UTC date-time ending in Z, with millisecond precision in normal JavaScript output. For example, 2026-10-03T14:25:36.123Z identifies the UTC time directly rather than relying on the machine’s local timezone.
#1 Best Overall
- Compatible with Nintendo Switch 2’s new GameChat mode
- Auto-Light Balance: RightLight boosts brightness by up to 50%, reducing shadows so you look your best—compared to previous-generation Logitech webcams (1)
- Privacy with a Slide: The integrated webcam cover makes it easy to get total, reliable privacy when you're not on a video call
- Built-In Mic: The built-in microphone lets others hear you clearly during video calls
- Easy Plug-And-Play: The Brio 101 works with most video calling platforms, including Microsoft Teams, Zoom and Google Meet—no hassle; it just works
Record completion time instead
If your record should describe when the screenshot operation finished, take the second timestamp after the promise resolves. Keeping both is useful when you need to distinguish workflow duration from the point at which capture began.
const captureStartedAt = new Date().toISOString();
await page.screenshot({ path: 'capture.png', fullPage: true });
const captureCompletedAt = new Date().toISOString();
Write the chosen field—or both fields—to the JSON sidecar, and name them explicitly. Do not label a start time as a completion time.
Rank #2
- Compatible with Nintendo Switch 2’s new GameChat mode
- Crisp HD 720p/30 fps video calls with diagonal 55° field of view and auto light correction. Compatible with popular platforms including Skype and Zoom.
- The built-in noise-reducing mic makes sure your voice comes across clearly up to 1.5 meters away, even if you’re in busy surroundings.
- C270’s RightLight 2 feature adjusts to lighting conditions, producing brighter, contrasted images to help you look good in all your conference calls.
- The adjustable universal clip lets you attach the camera securely to your screen or laptop, or fold the clip and set the webcam on a shelf. You’re always ready for your next video call.
Choose the screenshot scope and output
Playwright’s screenshot API can save to a path or return image bytes if you omit the path. A full-page screenshot captures the full scrollable page; the default screenshot is limited to the current viewport. A locator’s screenshot method can capture one element. See the Playwright screenshots documentation for the API details.
| Choice | When to use it | Metadata to record |
|---|---|---|
| Viewport or full page | Use the viewport for the visible screen; use fullPage: true for the full scrollable page. |
The selected mode and relevant viewport dimensions. |
| Element capture | Use a locator’s screenshot method when only a specific page element matters. | The locator or a description of the targeted element. |
| PNG, JPEG, or WebP | Choose the output format to suit your storage and image-use needs. | The format and any relevant quality setting. |
| File or returned bytes | Set path to save directly, or omit it to receive bytes for separate storage or processing. |
The file path or the identifier of the separate storage destination. |
| Scale, clipping, masks, caret, or animation | Set these options when the image should have controlled dimensions or presentation. | Every non-default option that could affect a repeat capture. |
For repeatability, include browser name and version, Playwright version, viewport and device scale, screenshot options, and navigation errors in the sidecar. Playwright does not automatically create a preservation manifest; these fields are practical metadata for your own workflow. The exact values depend on the browser and options used for each run.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Rank #3
- 【Full HD 1080P Webcam】Powered by a 1080p FHD two-MP CMOS, the NexiGo N60 Webcam produces exceptionally sharp and clear videos at resolutions up to 1920 x 1080 with 30fps. The 3.6mm glass lens provides a crisp image at fixed distances and is optimized between 19.6 inches to 13 feet, making it ideal for almost any indoor use.
- 【Wide Compatibility】Works with USB 2.0/3.0, no additional drivers required. Ready to use in approximately one minute or less on any compatible device. Compatible with Mac OS X 10.7 and higher / Windows 7, 8, 10 & 11 / Android 4.0 or higher / Linux 2.6.24 / Chrome OS 29.0.1547 / Ubuntu Version 10.04 or above. Not compatible with XBOX/PS4/PS5.
- 【Built-in Noise-Cancelling Microphone】The built-in noise-canceling microphone reduces ambient noise to enhance the sound quality of your video. Great for Zoom / Facetime / Video Calling / OBS / Twitch / Facebook / YouTube / Conferencing / Gaming / Streaming / Recording / Online School.
- 【USB Webcam with Privacy Protection Cover】The privacy cover blocks the lens when the webcam is not in use. It's perfect to help provide security and peace of mind to anyone, from individuals to large companies. 【Note:】Please contact our support for firmware update if you have noticed any audio delays.
- 【Wide Compatibility】Works with USB 2.0/3.0, no additional drivers required. Ready to use in approximately one minute or less on any compatible device. Compatible with Mac OS X 10.7 and higher / Windows 7, 10 & 11, Pro / Android 4.0 or higher / Linux 2.6.24 / Chrome OS 29.0.1547 / Ubuntu Version 10.04 or above. Not compatible with XBOX/PS4/PS5.
Keep the timestamp with the image
A sidecar JSON file keeps the UTC timestamp and context separate from the visual evidence. For example, the pair capture.png and capture.json makes it clear which metadata belongs to which image. Include the original URL and state the timestamp’s meaning, format, browser, tool version, and relevant capture settings.
Do not burn the timestamp into the screenshot unless you specifically need a visible label. Doing so modifies the captured pixels; it is not the same as preserving the original screenshot plus its metadata.
Rank #4
- 1080P Webcam with Cover for Video Calls - EMEET computer webcam provides design and Optimization for professional video streaming. Realistic 1920 x 1080p video, 5-layer anti-glare lens, providing smooth video. C960 computer camera delivers 1920x1080 video with fixed focus (11.8–118.1 inches), so as to provide a clearer image. C960 USB webcam has a cover and can be removed automatically to meet your needs for privacy. For optimal image performance, use the webcam in a well-lit environment.
- Built-in 2 Omnidirectional Mics - EMEET webcam with microphone for desktop features 2 built-in omnidirectional microphones, picking up your voice to create clear audio for communication. When installing the webcam, select EMEET C960 as the default microphone input device in your computer and video applications and select C960 as the default device in Zoom/Teams and ensure microphone permissions are enabled for proper use. Please note that C960 does not include built-in speakers.
- Automatic Light Adjustment - Automatic exposure adjustment is applied in EMEET HD webcam 1080p so that the streaming webcam can deliver stable image performance. EMEET C960 camera for computer also features color adjustment and exposure optimization to help you look your best. For optimal video quality, it is recommended to use the webcam in normal or well-lit environments and select suitable video settings in your application. Proper lighting helps achieve a clearer and more balanced image.
- Plug-and-Play & Upgraded USB Connectivity - New C960 webcam features both USB Type-A & A-to-C adapter connections for wider compatibility. For stable performance, connect the webcam directly to the computer's main USB port and ensure the device is recognized correctly. If a hub or docking station is used, please ensure it provides sufficient power and stable data transmission, as limited ports may affect performance. 90° wide-angle lens captures more participants without frequent adjustments.
- High Compatibility & Multi Application - C960 webcam for laptop is compatible with Windows 10/11, macOS 10.14+, and Android TV 7.0+. Not supported: Windows Hello, TVs, tablets, or game consoles. It works with Zoom, Teams, Facetime, Google Meet, YouTube and more. Please select C960 webcam as the default camera and microphone device in your application and ensure camera/microphone permissions are enabled, especially on macOS. (Tips: Incompatible with Windows Hello)
A screenshot is not a complete web archive
A screenshot records appearance. It does not preserve the site’s underlying resources, network responses, interactive state, or ability to replay the page later. It also cannot by itself guarantee that authenticated or externally hosted content will be captured in full.
For preservation of web resources rather than only a visual image, the Library of Congress identifies WARC as its preferred web-archive format. WARC packages web resources and related information; its records include mandatory date, type, and length fields. The Library also notes that current web-capture tools may not preserve streaming media, deep web content, or databases. See the Library of Congress Recommended Formats Statement for Web Archives and the WARC format specification.
Recommended Free Tools
Best Value
- Compatible with Nintendo Switch 2’s new GameChat mode
- HD lighting adjustment and autofocus: The Logitech webcam automatically fine-tunes the lighting, producing bright, razor-sharp images even in low-light settings. This makes it a great webcam for streaming and an ideal web camera for laptop use
- Advanced capture software: Easily create and share video content with this Logitech camera that is suitable for use as a desktop computer camera or a monitor webcam
- Stereo audio with dual mics: Capture natural sound during calls and recorded videos with this 1080p webcam, great as a video conference camera or a computer webcam
- Full HD 1080p video calling and recording at 30 fps. You'll make a strong impression with this PC webcam that features crisp, clearly detailed, and vibrantly colored video
Or skip the browser setup
ScreenshotNeo offers a one-request screenshot API and an MCP server for AI agents. Its cleanup options can accept consent banners and remove more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step 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. The API returns a screenshot or PDF, but this example does not add a UTC timestamp sidecar: record that metadata in your own workflow if you need it.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
See the ScreenshotNeo API documentation for authentication and request options. ScreenshotNeo has MCP tools for taking screenshots, getting page information, and capturing PDFs. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. Learn more at ScreenshotNeo, or sign up for the free plan.
Troubleshooting
- The timestamp appears to be local time: Use
toISOString()rather than formatting a date with local-time methods. Check for the endingZ, which marks UTC. - The sidecar says “start” but the image was written later: That is expected if the timestamp was taken before
page.screenshot(). Record a separate completion timestamp after the call resolves if that distinction matters. - The script fails to launch Chromium: Install the browser binary with
npx playwright install chromiumin the project environment, then rerun the script. - Navigation fails or the page is incomplete: Inspect the error from
page.goto()and record it in the sidecar rather than treating the screenshot as a successful, complete capture. A page that loads dynamically may need a deliberate wait condition or selector before capture. - The screenshot contains only the visible portion: Set
fullPage: truefor the full scrollable page, or use a locator screenshot for a particular element. - Repeat captures do not look alike: Record the browser and Playwright versions, viewport, device scale, and screenshot options. Dynamic content, animation, and externally hosted or authenticated content may also vary between runs.
Frequently Asked Questions
Does the UTC timestamp get embedded in the PNG?
No. The example stores the timestamp in a JSON sidecar. Embedding visible text would alter the screenshot pixels.
Is a full-page screenshot equivalent to a WARC archive?
No. It records a visual rendering; WARC is intended to package web resources and related information.
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.

