User Agents

Web browsers and everyday web tech, explained

Capture Network Requests and Responses in Chrome

· 5 min read · Browsers

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Capturing network requests and full response data in Chrome allows developers, testers, and troubleshooters to inspect how a web page communicates with servers. This includes viewing HTTP headers, request methods, status codes, payloads, cookies, and complete response bodies. It’s essential for debugging API calls, analyzing performance, identifying errors, and verifying data flow. Chrome DevTools provides a built-in, powerful interface to monitor and record all network activity directly within the browser. No extensions or external tools are required—everything needed is native to Chrome.

What You'll Need

  • Google Chrome browser (version 80 or later recommended)
  • A website or web application to test
  • Basic understanding of HTTP concepts (optional but helpful)

Step-by-Step

  1. Open Google Chrome and navigate to the web page you want to analyze. Make sure the page is fully loaded before proceeding.
  2. Right-click anywhere on the page and select Inspect from the context menu. Alternatively, press Ctrl+Shift+I (Windows/Linux) or Cmd+Option+I (Mac) to open Chrome DevTools.
  3. In the DevTools panel, click the Network tab at the top. If the panel is not visible, ensure it's enabled by checking that the console or any other tab isn’t hiding it.
  4. Before performing any action, click the Clear button (a circle with a slash) to remove any existing logs. This ensures you only capture new requests.
  5. Check the Preserve log checkbox at the top of the Network tab if you plan to navigate across pages or reload. This prevents logs from being cleared during page transitions.
  6. Perform the action you want to monitor—such as submitting a form, clicking a button, or loading dynamic content. As the browser makes requests, they will appear in real time in the Network tab.
  7. Click on any individual request in the list to view detailed information. The right panel will display multiple subtabs: Headers, Preview, Response, Timing, and others.
  8. Go to the Headers subtab to see request and response headers, including method, URL, status code, user agent, cookies, and content type.
  9. Navigate to the Response subtab to view the full server response. For JSON APIs, this shows raw data. For HTML, it displays the returned markup. Binary responses (like images) may not render as text.
  10. Use the Preview subtab to see formatted, human-readable versions of responses—especially useful for JSON, XML, or images.
  11. Check the Timing subtab to analyze how long each phase of the request took (e.g., DNS lookup, SSL handshake, download).
  12. To save captured data, right-click anywhere in the request list and select Save all as HAR with content. This exports a .har file containing full request and response data, including headers, bodies, and timing.
  13. To reload and capture immediately, press F5 or Ctrl+R while the Network tab is active. All new requests will be recorded from page load onward.
  14. Use filters at the top (e.g., XHR, JS, CSS, Media) to narrow down request types. Click XHR to focus only on AJAX/fetch calls, commonly used for API debugging.
  15. Enable Disable cache (next to Preserve log) to ensure all resources are fetched fresh from the server, not from browser cache.

Common Mistakes

  • Forgetting to clear the log before starting, leading to confusion from old requests.
  • Not enabling Preserve log, causing the list to clear on page navigation or reload.
  • Overlooking the Disable cache option, resulting in cached responses that don’t reflect live server behavior.
  • Inspecting the wrong request—especially when multiple similar calls occur. Always verify the URL and payload.
  • Assuming binary responses (e.g., PDFs, images) will show readable content in the Response tab—most won’t unless base64-encoded.
  • Missing the Preview tab, which often displays structured data more clearly than raw response text.

Tips

  • Use keyboard shortcuts to speed up workflow: Ctrl+Shift+J opens DevTools with Console focused; Ctrl+Shift+P opens the Command Menu to quickly jump to the Network tab.
  • Right-click column headers in the Network table to customize which data is displayed (e.g., add Response Body size).
  • Sort requests by size or time by clicking column headers—helpful for identifying performance bottlenecks.
  • Use the Filter box to search for specific URLs, file types, or status codes (e.g., type 404 to find errors).
  • Hold Shift while clicking the reload button to perform a hard reload and capture all requests from scratch.
  • For SPAs (Single Page Applications), focus on XHR/fetch requests after initial load—they often carry the real data.

Troubleshooting

  • No requests appear: Ensure the Network tab is open before the page loads or action is taken. If already open, try a hard reload and verify Preserve log is on.
  • Response body missing: Some responses (especially from CORS or opaque origins) may not expose full data. Check if the request is marked cors or opaque in DevTools. Opaque responses cannot show full details due to browser security.
  • Stale data shown: Disable cache and perform a hard reload. Also, check if server-side caching is active.
  • HAR export fails: Ensure you have write permissions in the save location. Try saving to the desktop. If the file is empty, confirm requests were captured before export.
  • DevTools won’t open: Check if Chrome is in kiosk mode or managed by an organization that restricts developer tools. Try a different profile or browser instance.
  • Missing POST data: In the Headers tab, expand Request Payload to view form data or JSON sent in POST requests. If not visible, the request may be using GET or have no body.

Frequently Asked Questions

Can I capture HTTPS responses?

Yes, Chrome can capture full HTTPS request and response data, including headers and bodies, as long as the connection is valid and the page loads normally. The browser decrypts traffic for inspection.

Why is the response tab empty for some requests?

This often happens with binary files (e.g., images, fonts) or when the response is served from cache. It can also occur with cross-origin requests marked as opaque due to CORS restrictions.

Can I edit and replay requests?

Yes—right-click any request and select Replay XHR (for AJAX calls) or use Copy as fetch to generate JavaScript code you can modify and run in the Console.

Does this work on mobile Chrome?

Not directly—mobile Chrome doesn’t support full DevTools. However, you can remotely debug an Android device via USB using Chrome on desktop.

Are cookies and authentication headers visible?

Yes, if the request includes them, cookies and authorization headers appear in the Headers tab. Sensitive values may be partially masked depending on browser settings.

Is capturing network data safe?

Yes, when used on your own sites or with permission. Never capture data from sensitive accounts without authorization—your actions may be logged server-side.