Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk6 min

How to Modify Web Captures with JavaScript

A practical guide to modifying local browser responses, intercepting API data in Playwright, editing HAR fixtures, and creating web archives without confusing these workflows.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

“Web capture” can mean three different things: a local copy of a website response, a response changed inside an automated test, or a recorded network exchange or archival snapshot. Use Chrome DevTools Local Overrides to prototype a local change, Playwright interception or HAR replay to create repeatable test data, and an archival tool such as Scoop to make new web archives. None of these workflows silently changes the live website’s server-side data.

Choose the right kind of web capture to modify

What you need Use What changes
Try a content, resource, or header change while browsing Chrome DevTools Local Overrides A local copy served by DevTools on reload; the origin server is unchanged.
Make a page receive altered API data during a test Playwright route interception The response fulfilled to the page by the test’s interception layer.
Replay a saved network fixture deterministically Playwright HAR routing The saved recording or its payload files, then matching requests during replay.
Create a browser-based archival capture Scoop A newly created WARC/WACZ-family capture and optional associated materials.

If you already have an archive and want to edit it, first identify its format and replay software. The available Scoop documentation describes creating captures, not general-purpose editing of existing archives.

Use Chrome DevTools Local Overrides for interactive changes

Local Overrides are the quickest choice when you want to change what your own browser displays while prototyping. DevTools saves a local copy of a response or resource and serves that copy on later reloads. Chrome describes the behavior this way: “When you reload the page, DevTools serves the local, modified file, rather than the network resource.” See Chrome DevTools Local Overrides.

  1. Open the page in Chrome and open DevTools.
  2. Open the Network panel. Right-click the request you want to change and choose Override content or Override headers.
  3. On first use, select a folder for overrides and grant DevTools permission to use it.
  4. Edit the saved resource or headers, save the change, and reload the page.

The workflow can be used for response content, XHR/fetch responses, and response headers. The page change is local to the browser’s override setup; it does not update the website’s server.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • 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.

What Local Overrides do not preserve

  • DevTools automatically disables the browser cache while Local Overrides are active.
  • Edits made directly in the Elements panel’s DOM tree are not saved as overrides.
  • CSS changes made in the Styles pane are not saved when the CSS is embedded in an HTML file. Edit the HTML through Sources instead.
  • Source-mapped files cannot be overridden directly through the described Network workflow.

If an edit disappears after reload, make sure you changed and saved the overridden resource rather than only changing the live DOM or a transient style.

Change an API response in a Playwright test

For a repeatable test, intercept the request, fetch its real response, modify the JSON in JavaScript, and fulfill the browser request with the changed data. The test page sees the fulfilled response; the underlying API’s stored data is not mutated. Playwright documents this pattern in its Mock APIs guide.

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 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.
import { test, expect } from '@playwright/test';

test('renders a modified API response', async ({ page }) => {
  await page.route('**/api/profile', async route => {
    const response = await route.fetch();
    const profile = await response.json();

    profile.name = 'Test User';

    await route.fulfill({
      response,
      json: profile,
    });
  });

  await page.goto('https://example.com/profile');
  await expect(page.getByText('Test User')).toBeVisible();
});

Replace the route pattern, page URL, JSON property, and assertion with those for your application. This example follows the documented API-JSON workflow; do not assume the same parsing and patching code applies unchanged to every resource type.

When this method fits

  • Test a UI state that the backend does not currently return.
  • Keep a test repeatable without waiting for a backend change.
  • Start with a real response but alter selected fields for a scenario.

Edit and replay a HAR fixture with Playwright

A HAR file records network exchanges for later replay. Playwright lets you edit the recorded JSON (and payload files in an archive), then route matching browser requests from that recording with page.routeFromHAR() or browserContext.routeFromHAR(). This is different from changing a live server response: the test is using saved fixture data. See Playwright’s Mock APIs guide.

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.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • 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.
import { test, expect } from '@playwright/test';

test('replays the saved network fixture', async ({ page }) => {
  await page.routeFromHAR('./fixtures/site.har', {
    update: false,
  });

  await page.goto('https://example.com');
  await expect(page.getByRole('heading', { name: 'Example' })).toBeVisible();
});

Edit the relevant recorded response data in the HAR before running the test. With update mode off, Playwright serves a matching saved exchange; a request with no match is aborted. HAR replay matching is strict for URL and HTTP method, and for POST requests it also strictly matches the POST payload. If multiple recordings match, Playwright chooses the one with the most matching headers. Redirects are followed automatically.

Diagnose a replay miss

  • Compare the request URL exactly, including query string, with the recorded entry.
  • Check the HTTP method and, for POST, the request payload.
  • If the same URL and method appear more than once, inspect headers and the selected recording.
  • Check whether the request redirects and whether the relevant exchange is present in the HAR.

Create a web archive rather than editing a test fixture

If your goal is preservation or later analysis, create an archival capture rather than treating a HAR fixture as a complete archive. Harvard Library Innovation Lab’s Scoop project describes a browser-based, single-page capture engine callable through a CLI or JavaScript library. Its documented outputs include .warc, .warc.gz, and .wacz; optional capture attachments include provenance, screenshots, video, PDF, a DOM snapshot, and SSL certificates. The project also describes WACZ signing and verification support and optional raw exchanges for later analysis or reprocessing.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • 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

Those capabilities concern creating and configuring captures. They do not establish that arbitrary edits to an existing archive preserve its signatures, provenance, or replay fidelity. For an existing file, identify its container and the software that consumes it before changing anything.

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

Protect sensitive data in captures

HAR files may contain cookies and information submitted in forms. Google Cloud’s browser-trace capture guidance warns about this information and recommends editing or sanitizing captures when needed. Chrome’s Network reference says sanitized HAR export is the default and excludes Cookie, Set-Cookie, and Authorization headers; exporting sensitive data requires enabling the setting and choosing that export option.

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.
Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 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.

Header sanitization is not proof that every personal or secret value has been removed: sensitive data can also appear in request or response bodies. Inspect the full file and redact what should not be shared before sending it to support or committing it as a fixture.

Or skip the browser setup

If what you need is a screenshot rather than an editable test fixture or archive, ScreenshotNeo is a website screenshot API and MCP server. A single GET request can return an image or PDF. For example, save a screenshot of a page as WebP:

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 documentation for request options. Cookie banners, newsletter popups, and chat widgets are removed before capture; those 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 offers take_screenshot, get_page_info, and capture_pdf for AI agents. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots. Screenshot output is not a substitute for editing a HAR or changing what a test page receives.

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

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

Frequently Asked Questions

Does a Chrome Local Override change the live website for other visitors?

No. It serves a saved local copy through DevTools in your browser; it does not write to the origin server.

Can I use ScreenshotNeo to modify a HAR or WARC archive?

No. ScreenshotNeo returns screenshots or PDFs; it is not an archive editor or a test-response fixture tool.

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 *

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

More from the Wire

  1. Shenzhen desk3 min
    HONOR Expands Beyond Smartphones With Humanoid Robot RevealHONOR said it unveiled its first humanoid robot at MWC 2026 and named shopping assistance, workplace inspections, and supportive companionship as intended uses. Later Robotics D1 claims and a reported…
  2. Cupertino desk5 min
    Apple Unveils AirPods Max 2: The Upgrade That Should Have Happened Years AgoAirPods Max 2 adds H2-powered audio features and Apple claims up to 1.5× more effective ANC, but its design, Smart Case, and 20-hour battery rating are unchanged. Wired lossless audio…
  3. Cupertino desk4 min
    Apple’s OLED Touch MacBooks Are Coming—but the Dynamic Island Is the Real GambleApple has not announced an OLED touchscreen MacBook, but reports point to high-end models arriving in late 2026 or early 2027. The reported Mac Dynamic Island could be useful, but…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

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.