TidyURLs
Go to Tools
BLOG
The TidyURLsJournal

Practical guides, tutorials, and insights about URLs, SEO, web development, and online marketing. Learn, troubleshoot, and get the most of the web.

Back to the Journal
TidyURLs Journal

Chrome DevTools Network Tab Tutorial: Debug Requests Step by Step

Practical insights, clear explanations, and useful ideas for understanding the web.

October 25, 20269 min read5 topics
Chrome DevTools Network Tab Tutorial: Debug Requests Step by Step
Explore the details
#Chrome DevTools#Network debugging#HTTP#Frontend development#Web development
October 25, 20269 min read

A page can look broken even when the problem is hidden in one request: an API call may return an error, a browser may block a response, or cached data may be stale. The Network tab in Chrome DevTools helps you see what the browser actually requested and how the server or browser responded. This tutorial walks through a practical workflow for investigating methods, status codes, headers, payloads, timing, caching, and failed requests.

Key takeaways

  • Open the Network tab before reproducing a problem so the request is captured.
  • Check the request method, status, headers, payload, and timing together; one field rarely explains the whole issue.
  • Distinguish server responses from browser failures, cache behavior, and CORS restrictions.
  • Use fictional or sanitized data when sharing screenshots or HAR files. HAR exports can contain cookies and sensitive headers.

Start a useful Network recording

  1. Open the page where the issue occurs, then open DevTools with F12 or Ctrl+Shift+I on Windows/Linux, or Command+Option+I on macOS.
  2. Select Network. If DevTools was opened after the page loaded, reload the page to capture its requests.
  3. Reproduce the behavior once. Keep the recording focused: a short capture is easier to inspect than a long session.
  4. Use the resource-type filters, search box, or filter expressions to narrow the list. Select Fetch/XHR to focus on API calls, or select another resource type when investigating images, scripts, stylesheets, or documents.
  5. Select a request to inspect its details. The available tabs commonly include Headers, Payload, Preview, Response, Initiator, and Timing.

The request list gives an overview, but the details pane is where you can compare what was sent with what came back. The exact labels and layout can vary between Chrome versions.

Read the request method and status together

A request method tells you what kind of operation the client is attempting. Common methods include:

  • GET retrieves a representation, such as a list of products.
  • POST commonly submits data or creates a resource.
  • PUT commonly replaces a resource, while PATCH commonly applies a partial update.
  • DELETE requests removal of a resource.
  • OPTIONS may be a browser-generated CORS preflight asking whether a cross-origin request is permitted.

The method alone does not prove what the server did. Check it alongside the URL, payload, response, and status. For example, a fictional POST /api/orders request with a JSON body may be returning a validation error because a required field is missing.

HTTP status codes provide a first clue:

Status or resultWhat to investigate
2xxThe request succeeded at the HTTP level. Check the response body and application behavior too.
301 or 302Inspect the redirect chain and final destination.
304The browser can reuse a cached representation, subject to the response's caching rules.
400 or 422Check the request payload and the server's validation response.
401 or 403Check authentication, permissions, and whether the expected credentials were sent.
404Verify the path, environment, and whether the resource exists.
429Check rate limits and any retry guidance returned by the service.
5xxThe server or an upstream service may have failed; inspect the response and compare with server-side logs if available.
(failed), canceled, or no HTTP statusInvestigate browser errors, network connectivity, blocked requests, DNS/TLS problems, or the request's lifecycle.

A status code is evidence, not a complete diagnosis. A successful HTTP response can still contain an application-level error, and a browser-blocked response may not provide JavaScript with the server's response details. When a request returns a status code, the HTTP status checker can help check the response from its own context, but it cannot reproduce your browser session, cookies, CORS rules, or page-specific request headers.

Inspect headers and payloads

In Headers, review the request URL, method, status, and both request and response headers. Headers often explain differences between environments or why a browser handles a response in a particular way.

Useful request headers to inspect include:

  • Content-Type, which describes the format of a request body when one is sent.
  • Accept, which indicates response formats the client can handle.
  • Authorization and cookie-related headers, which affect authenticated requests. Treat their values as sensitive.
  • Origin, which is relevant when investigating cross-origin behavior.

Useful response headers can include Content-Type, Cache-Control, ETag, and CORS-related headers such as Access-Control-Allow-Origin. Do not assume that a missing header is the cause without checking the request context and browser console. For cross-origin requests, inspect whether an OPTIONS preflight occurred and whether its response permits the actual method and headers. A server can return a response that is not available to page JavaScript if the browser's CORS checks fail.

Open Payload to inspect query parameters, form data, or a request body. For a JSON request, confirm that the field names, values, and data types match what the API expects. Be careful not to expose real personal data, access tokens, or other secrets when taking screenshots or sharing captures.

The Response and Preview tabs help distinguish a transport-level success from an application-level problem. For example, a fictional endpoint might return 200 with {"error":"account not active"}. The request succeeded according to HTTP, but the application still needs to handle the returned error state.

Use Timing and Initiator to find where a request stalls

The Timing tab breaks down phases of a request. Depending on the request and browser version, these can include queueing or stalled time, DNS lookup, connection setup, TLS negotiation, sending the request, waiting for the first response byte, and downloading the response.

Use the longest phase as a lead, not a verdict. A long wait for the first byte can point toward server or upstream processing, while a large download phase can indicate a large response or slow transfer. Connection phases may be absent when a connection is reused. Browser scheduling, extensions, service workers, and network conditions can also affect what you see.

The Initiator view helps identify what caused a request, such as a script, stylesheet, or document. If the same request is repeated unexpectedly, inspect its initiator and the code path that triggers it. Compare a failing request with a successful one, paying attention to differences in URL, method, payload, headers, and timing.

Investigate caching without confusing the results

A response may come from the network, memory cache, disk cache, or a service worker. Look for cache-related information in the request list and headers, and consider whether the page is controlled by a service worker. A 304 Not Modified response is part of HTTP caching behavior; it is not the same as a failed request.

For a controlled comparison, DevTools provides a Disable cache option while DevTools is open. This changes the conditions of the test, so first capture the normal behavior, then repeat with the option enabled if you need to compare. It does not necessarily bypass service-worker behavior. If relevant, test the service worker separately using the Application panel and document which settings you changed.

Avoid treating a hard reload or cache-disabled run as proof of what every user experiences. The browser's cache state, service worker, authentication, and network can differ between sessions.

A practical debugging workflow

Suppose a fictional dashboard does not show new inventory after a user submits a change:

  1. Open DevTools before submitting the change and select Network.
  2. Filter to Fetch/XHR, reproduce the issue, and find the request associated with the update.
  3. Verify the method and URL. Confirm that the request targets the intended environment and endpoint.
  4. Check the status, then inspect the response body. A 4xx response may include a validation explanation; a 2xx response may still report an application-level issue.
  5. Inspect the payload and relevant headers. Confirm the request contains the expected fields and content type, without copying secrets into notes or screenshots.
  6. Review Timing and Initiator if the call is slow, delayed, or unexpectedly repeated.
  7. Repeat under normal caching conditions and, if needed, with cache disabled. Record the difference and settings used.
  8. Compare with server-side logs or API documentation when available. DevTools shows the browser-side exchange; it cannot explain every internal server decision.

Diagnose failed requests carefully

When a request appears as failed or has no usable response, read the Console for related browser messages and inspect the request's details. Consider these possibilities:

  • Network or name-resolution issue: The browser may be unable to reach the host. Confirm the URL and test from an authorized environment.
  • TLS or certificate problem: The browser may reject the connection before an HTTP response is available.
  • CORS restriction: The server may have responded, but the browser can prevent page JavaScript from reading that response. Inspect the console and preflight exchange.
  • Canceled or replaced request: Navigation, application logic, or an explicit abort may stop a request before it completes.
  • Authentication or authorization failure: Check whether the request was made with the expected session and permissions; do not share credential values.
  • Service worker or extension interference: Compare in a controlled profile or test environment when appropriate, while noting that this changes the environment.

A URL parser or status checker can help inspect a URL or a response from another context, but neither replaces browser diagnostics, server logs, or security controls. Do not send production secrets to third-party tools when investigating a request.

Common mistakes and pitfalls

  • Opening DevTools after the request: The earlier exchange may not be in the log. Reload or reproduce with recording active.
  • Assuming every 2xx means the feature worked: Check the response body and the frontend's interpretation of it.
  • Treating 304 as an error: Inspect cache headers and the browser's cached response.
  • Ignoring preflight requests: An OPTIONS failure can prevent the browser from sending the intended cross-origin request.
  • Changing several settings at once: Keep a normal capture, then make one controlled change so the comparison is meaningful.
  • Confusing browser and server errors: A browser-blocked request may not have an HTTP status that page code can read.
  • Sharing an unsanitized HAR: HAR files can include cookies, authorization values, query strings, request bodies, and other sensitive data. Review and sanitize a file before sharing it, and share it only with trusted recipients through an approved channel.

Conclusion

The Network tab is most useful when you investigate one request systematically: identify what triggered it, verify its method and status, inspect headers and payload, then use timing and cache details to narrow down the cause. Combine those browser-side observations with application and server logs when the answer is not visible in DevTools. Keep captures short, compare conditions carefully, and protect sensitive request data when sharing evidence.

References