Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk6 min

Measure Slow APIs and Frontend Wait Time: A Practical Testing Guide

A practical guide to measuring browser request milestones, timing usable frontend results, and reproducing slow network conditions in Chrome.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To test a slow API in a frontend, measure both the browser’s request milestones and the time until the user can complete the intended action. Use Resource Timing for request-to-first-byte and response-download intervals, User Timing around the interface operation, and Chrome DevTools to reproduce constrained network conditions. These measurements answer different questions; none should be reported simply as “latency” without defining what was timed.

Decide what “slow” means for the operation

Choose a specific endpoint and a user flow, such as submitting a search and waiting until its results can be used. Then distinguish three intervals:

As an Amazon Associate I earn from qualifying purchases.

  • Request to first byte: the browser’s interval from request start until response data begins arriving. It can include server processing and browser-side effects, so it is not pure network latency.
  • Response download: the time until the browser finishes receiving the resource body.
  • User-visible completion: the time until the application has rendered a useful result and the user can proceed.

A request can finish before the interface is ready, for example if the application still has to parse data or render results. Conversely, a user operation may involve several requests, so one endpoint’s timing does not describe the whole experience.

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

Measure browser-observed request timing

Resource Timing entries expose milestones from the browser’s timeline. A PerformanceObserver can watch resource entries as they arrive and include entries already recorded with buffered: true. Filter entries to the endpoint you care about; inspect the entry’s name and initiatorType so unrelated resources do not get mixed into the result.

const observer = new PerformanceObserver((list) => {
  for (const entry of list.getEntries()) {
    if (!entry.name.includes("/api/search")) continue;

    console.log({
      url: entry.name,
      initiatorType: entry.initiatorType,
      requestToFirstByteMs: entry.responseStart - entry.requestStart,
      fetchDurationMs: entry.responseEnd - entry.fetchStart,
      dnsMs: entry.domainLookupEnd - entry.domainLookupStart,
      connectionMs: entry.connectEnd - entry.connectStart,
      redirectMs: entry.redirectEnd - entry.redirectStart,
    });
  }
});

observer.observe({ type: "resource", buffered: true });

The calculations describe intervals on the browser timeline, not packet-level measurements. In particular, connectEnd - connectStart can include transport connection and TLS-related setup. responseEnd - fetchStart covers the final resource fetch, whereas the entry’s duration includes redirects. DNS, connection, and redirect intervals can be zero or uninformative when those stages did not occur in the way the timing fields represent.

Interpret missing or zero fields cautiously. A cached resource, a reused connection, a cancelled request, or restricted cross-origin timing data can affect what appears. For cross-origin resources, detailed timing fields may be hidden or zero unless the response allows timing access with the Timing-Allow-Origin header. A zero does not necessarily mean the stage took zero milliseconds. See the Resource Timing API reference and requestStart reference.

Resource Timing’s default buffer holds 250 entries. If an application records more resources, manage the buffer size and listen for the buffer-full event rather than assuming every entry will remain available. The Resource Timing API reference describes the buffer and available entry fields.

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

Time the result the user actually needs

Mark the start of the action and the moment the interface reaches a meaningful completion state. For a search, that might mean results have rendered and can be interacted with—not merely that fetch() resolved.

performance.mark("search-submit");

async function runSearch(query) {
  const response = await fetch(`/api/search?q=${encodeURIComponent(query)}`);
  const results = await response.json();
  renderResults(results);

  // Call this after the result state is rendered and usable.
  performance.mark("search-usable");
  performance.measure("search-to-usable", "search-submit", "search-usable");

  console.log(performance.getEntriesByName("search-to-usable").at(-1).duration);
}

Place the completion mark where the application’s real usability condition is met. If rendering is scheduled asynchronously or usability depends on another state change, marking immediately after starting that work measures the wrong endpoint. User Timing lets you define application-specific intervals with marks and measures; see the User Timing measure reference.

For server-side phase detail, ask the backend to emit a Server-Timing response header. It can report server-side metrics alongside the browser’s timings, but cross-origin visibility still depends on the response’s timing access policy. It complements rather than replaces the user-facing measure. See the Server-Timing header reference.

Rank #3
API 5-in-1 Test Strips Freshwater and Saltwater Aquarium Test Strips 25-Count Box
  • Contains one (1) API 5-IN-1 TEST STRIPS Freshwater and Saltwater Aquarium Test Strips 25-Count Box
  • Monitors levels of pH, nitrite, nitrate carbonate and general water hardness in freshwater and saltwater aquariums
  • Dip test strips into aquarium water and check colors for fast and accurate results
  • Helps prevent invisible water problems that can be harmful to fish and cause fish loss
  • Use for weekly monitoring and when water or fish problems appear

Reproduce slow network conditions in Chrome

Throttle the whole page session

  1. Open Chrome DevTools and select the Network panel.
  2. Choose a network throttling preset or configure a custom profile with explicit download speed, upload speed, and latency.
  3. For a first-visit test, disable the cache in DevTools. For repeat-visit behavior, run separately with a deliberately warm cache.
  4. Reload the page and perform the same user action you plan to measure. Record the profile, cache state, device or CPU conditions, and browser version with the result.

These profiles constrain the browser session while DevTools is open; they are useful for controlled comparisons, not a claim that a particular preset exactly matches a carrier or real-world network. The Chrome DevTools Network reference covers network throttling and request inspection.

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

Throttle or block one request

When the question is whether one suspected API is responsible, use request-specific conditions to throttle or block selected resources while leaving the rest of the page under normal conditions. Chrome’s documentation says individual-request throttling is available starting with Chrome 145; availability and interface labels can vary by Chrome version. The rules are temporary to the open DevTools session. See Chrome DevTools request conditions and the Network panel reference.

Use Lighthouse for an audit, not as a synonym for throttling

Lighthouse is useful when you want an automated page audit and prioritized performance guidance. Record whether the run uses simulated throttling or DevTools throttling: simulated mode scales results, while DevTools throttling applies CPU and network constraints during the audit and takes longer. These modes are not interchangeable with a direct browser measurement of a single API. See Lighthouse performance scoring.

Desktop CPU slowdown does not faithfully reproduce a mobile device’s CPU architecture. When actual target-device behavior matters, validate on those devices and networks rather than treating desktop emulation as equivalent. Kayce Basques of Chrome for Developers puts the Network panel’s role this way: “If you’re looking for ways to improve page load performance, don’t start with the Network panel.” The panel helps inspect requests and transfers; Lighthouse offers page-load improvement guidance. See Inspect network activity.

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

Make repeated runs comparable

Before comparing numbers, keep the test conditions fixed and write them down. At minimum, record:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Browser and version, page URL, endpoint, and the exact user action.
  • Network profile and whether throttling applies to the whole session or one request.
  • Cache state: cold-cache and warm-cache runs answer different questions.
  • Device or CPU class, and whether the run used an actual target device or desktop emulation.
  • Backend and environment, including whether server timing was exposed.

Repeat the same observation and report a distribution—such as the median and tail percentiles—when you have enough samples to make that summary useful. There is no universal sample count or pass/fail latency threshold established by these sources. Keep measured results separate from a product goal or service-level objective, which is a target rather than an observation.

Quick Recap

Bestseller No. 3
API 5-in-1 Test Strips Freshwater and Saltwater Aquarium Test Strips 25-Count Box
API 5-in-1 Test Strips Freshwater and Saltwater Aquarium Test Strips 25-Count Box
Dip test strips into aquarium water and check colors for fast and accurate results; Helps prevent invisible water problems that can be harmful to fish and cause fish loss
$12.98

Choose the measurement that answers your question

Question Useful method What it tells you Important limit
How long until the browser starts receiving the response? Resource Timing: responseStart - requestStart Browser-observed request-to-first-byte interval. Includes more than network transit; server work and browser effects can contribute.
How long until the resource has been received? Resource Timing: responseEnd - fetchStart Final resource fetch interval. Cache, service workers, connection reuse, and redirects affect interpretation; duration includes redirects.
When can a user complete the intended action? User Timing marks around the operation Application-defined time to a usable result. You must place the end mark at the actual completion state.
Which backend phase contributes to the wait? Server-Timing header plus browser timing Server-reported phase detail alongside client timing. Requires backend instrumentation; cross-origin access rules still apply.
How does the page behave under constrained conditions? DevTools network profile or request conditions Behavior with applied network constraints, session-wide or request-specific. Document the exact profile and cache/device conditions; DevTools rules are temporary.
How does an audited page score under Lighthouse? Lighthouse audit Automated page assessment and improvement guidance. State whether throttling is simulated or applied; it is not the same as measuring one endpoint.

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. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
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.