Network features reference (original) (raw)

Kayce Basques

Sofia Emelianova

Discover new ways to analyze how your page loads in this comprehensive reference of Chrome DevTools network analysis features.

Record network requests

By default, DevTools records all network requests in the Network panel, so long as DevTools is open.

The Network panel.

Stop recording network requests

To stop recording requests:

Clear requests

Click Clear Clear.on the Network panel to clear all requests from the Requests table.

The Clear button.

Save requests across page loads

To save requests across page loads, check the Preserve log checkbox on the Network panel. DevTools saves all requests until you disable Preserve log.

Capture screenshots during page load

Capture screenshots to analyze what users see as they wait for your page to load.

To enable screenshots, open Settings Settings. inside the Network panel and check Capture screenshots.

Reload the page while the Network panel is in focus to capture screenshots.

Once captured, you can interact with screenshots in the following ways:

Capture screenshots enabled.

Replay XHR request

To replay an XHR request, do one of the following in the Requests table:

Selecting Replay XHR.

Change loading behavior

Emulate a first-time visitor by disabling the browser cache

To emulate how a first-time user experiences your site, check the Disable cache checkbox. DevTools disables the browser cache. This more accurately emulates a first-time user's experience, because requests are served from the browser cache on repeat visits.

The Disable Cache checkbox.

Disable the browser cache from the Network conditions drawer

If you want to disable the cache while working in other DevTools panels, use the Network conditionsdrawer.

  1. Click the Network conditions. icon to open the Network Conditions drawer.
  2. Check or clear the Disable cache checkbox.

Manually clear the browser cache

To manually clear the browser cache at any time, right-click anywhere in the Requests table and select Clear browser cache.

Selecting Clear Browser Cache.

Emulate offline

There's a new class of web apps, called Progressive Web Apps, which can function offline with the help of service workers. When you're building this type of app, it's useful to be able to quickly simulate a device that has no data connection.

To simulate a completely offline network experience, select Offline from the Network throttling drop-down menu next to the Disable cache checkbox.

Offline selected from the drop-down menu.

DevTools displays a warning icon next to the Network tab to remind you that offline is enabled.

Emulate slow network connections

To emulate fast 4G, slow 4G, or 3G, select the corresponding preset from the Throttling drop-down menu in the action bar at the top.

The network throttling drop-down menu with presets.

DevTools displays a warning icon next to the Network panel to remind you that throttling is enabled.

Create custom throttling profiles

In addition to presets, such as slow or fast 4G, you can also add your own custom throttling profiles:

  1. Open the Throttling menu and select Custom > Add....
  2. Set up a new throttling profile as described in Settings > Throttling.
  3. Back on the Network panel, select your new profile from the Throttling drop-down menu.
    A custom profile selected from the throttling menu. The Network panel displays a warning icon.

DevTools displays a Warning. warning icon next to the Network panel to remind you that throttling is enabled.

Throttle WebSocket connections

In addition to HTTP requests, DevTools throttles WebSocket connections since version 99.

To observe WebSocket throttling:

  1. Initiate a new connection, for example, by using a test tool.
  2. On the Network panel, select No throttling and send a message through the connection.
  3. Create a very slow custom throttling profile, for example, 10 kbit/s. Such a slow profile will help you notice the difference.
  4. On the Network panel, select the profile and send another message.
  5. Toggle the WS filter, click your connection name, open the Messages tab, and check the time difference between sent and echoed messages with and without throttling. For example:

Messages sent and echoed with and without throttling.

Emulate slow network connections from the Network conditions drawer

If you want to throttle the network connection while working in other DevTools panels, use theNetwork conditions drawer.

  1. Click the Network conditions. icon to open the Network Conditions drawer.
  2. Select a connection speed from the Network throttling menu.

Manually clear browser cookies

To manually clear browser cookies at any time, right-click anywhere in the Requests table and selectClear browser cookies.

Selecting Clear Browser Cookies.

See Override files and HTTP response headers locally.

Override the user agent

To manually override the user agent:

  1. Click the Network conditions. icon to open the Network Conditions drawer.
  2. Clear Select automatically.
  3. Choose a user agent option from the menu, or enter a custom one in the box.

Search requests

To search across request headers, payloads, and responses:

  1. Press the following shortcut to open the Search tab on the right:
    • On macOS, Command + F.
    • On Windows or Linux, Control + F.
  2. In the Search tab, enter your query and press Enter. Optionally click or to turn on case sensitivity or regular expressions respectively.
  3. Click one of the search results. The Network panel highlights in yellow the request that matched. Additionally, the panel also opens the Headers or Response tab and highlights the string that matched there, if any.

The Search tab on the right in the Network panel.

To refresh search results, click Refresh. To clear results, click Clear.

For more information on all the ways you can search in DevTools, see Search: Find text across all loaded resources.

Filter requests

Filter requests by properties

Use the Filter box to filter requests by properties, such as the domain or size of the request.

If you can't see the box, the Filters bar is probably hidden. See Hide the Filters bar.

The Filters text box and Invert checkbox.

To invert your filter, check the Invert checkbox next to the Filter box.

You can use multiple properties simultaneously by separating each property with a space. For example, mime-type:image/gif larger-than:1K displays all GIFs that are larger than one kilobyte. These multi-property filters are equivalent to AND operations. OR operations aren't supported.

Next is a complete list of supported properties.

Filter requests by type

To filter requests by resource type, click the All, Fetch/XHR, JS, CSS, Img, Media,Font, Doc, WS (WebSocket), Wasm (WebAssembly), Manifest, or Other (any other type not listed here) buttons on the Network panel.

If you can't see these buttons, the Filters action bar is probably hidden. See Hide the Filters bar.

To show resources of multiple types simultaneously, hold Command (Mac) or Control (Windows, Linux) and then click several type filters.

Using the type filters to display CSS and Document resources.

Filter requests by time

Drag left or right on the Overview timeline to display only the requests that were active during that timeframe. The filter is inclusive. Any request that was active during the highlighted time is shown.

Filtering out any requests that weren't active around 21-25 ms.

Hide data URLs

Data URLs are small files embedded into other documents. Any request that you see in theRequests table that starts with data: is a data URL.

To hide these requests, in the Filters action bar, select More filters > Hide data URLs.

Data URLs hidden from the Requests table.

The status bar at the bottom displays the number of the shown requests out of the total.

Hide extension URLs

To focus on the code you author, you can filter out irrelevant requests sent by extensions you may have installed in Chrome. Extension requests have URLs that start with chrome-extension://.

To hide extension requests, in the Filters action bar, select More filters > Hide extension URLs.

Extension URLs hidden from the Requests table.

The status bar at the bottom displays the number of the shown requests out of the total.

Show only the requests with blocked response cookies

To filter out everything except the requests with response cookies blocked for any reason, in the Filters action bar, select More filters > Blocked response cookies. Try it on this demo page.

The Requests table shows only the requests with blocked response cookies.

The status bar at the bottom displays the number of the shown requests out of the total.

To find out the reason why a response cookie was blocked, select the request, open its Cookies tab, and hover over the information icon.

Additionally, the Network panel shows a warning icon next to a request with cookies blocked either because of Chrome flags or configuration. Hover over the icon to see a tooltip with a clue and click it to go to the Issues panel for more information.

Warning icons next to a request blocked by Chrome flags or configuration.

Show only blocked requests

To filter out everything except blocked requests, in the Filters action bar, select More filters > Blocked requests. To test this, you can use the Network request blocking tab in the drawer.

The Requests table shows only blocked requests.

The Requests table highlights blocked requests in red. The status bar at the bottom displays the number of the shown requests out of the total.

Show only third-party requests

To filter out everything except the requests with origin that differs from page origin, in the Filters action bar, select More filters > 3rd-party requests. Try it on this demo page.

The Requests table shows only the third-party requests.

The status bar at the bottom displays the number of the shown requests out of the total.

Sort requests

By default, the requests in the Requests table are sorted by initiation time, but you can sort the table using other criteria.

Sort by column

Click the header of any column in the Requests table to sort requests by that column.

Sort by activity phase

To change how the Waterfall sorts requests, right-click the header of the Requests table, hover overWaterfall, and select one of the following options:

These descriptions assume that each respective option is ranked from shortest to longest. Clicking on the Waterfall column's header reverses the order.

In this example, the Waterfall is sorted by total duration. The lighter portion of each bar is time spent waiting. The darker portion is time spent downloading bytes.

Sorting the Waterfall by total duration.

Analyze requests

So long as DevTools is open, it logs all requests in the Network panel. Use the Network panel to analyze requests.

View a log of requests

Use the Requests table to view a log of all requests made while DevTools has been open. Clicking or hovering over requests reveals more information about them.

The Requests table.

The Requests table displays the following columns by default:

Add or remove columns

Right-click the header of the Requests table and select an option to hide or show it. The displayed options have check marks next to them.

Adding or removing a column to the Requests table.

You can add or remove the following additional columns: Path, URL, Method, Protocol, Scheme, Domain, Remote address, Remote address space, Initiator address space, Cookies, Set cookies, Priority, Connection ID, Has overrides, and Waterfall.

Add custom columns

To add a custom column to the Requests table:

  1. Right-click the header of the Requests table and select Response Headers > Manage Header Columns.
  2. In the dialog window, click Add custom header, enter its name, and click Add.

Adding a custom column to the Requests table.

Group requests by inline frames

If inline frames on a page initiate a lot of requests, you can make the request log friendlier by grouping them.

To group requests by iframes, open Settings Settings. inside the Network panel and check Group by frame.

The network request log with requests grouped by iframes.

To view a request initiated by an inline frame, expand it in the request log.

View the timing of requests in relation to one another

Use the Waterfall to view the timing of requests in relation to one another. By default, theWaterfall is organized by the start time of the requests. So, requests that are farther to the left started earlier than those that are farther to the right.

See Sort by activity phase to see the different ways that you can sort the Waterfall.

The Waterfall column of the Requests tab.

Analyze the messages of a WebSocket connection

To view the messages of a WebSocket connection:

  1. Under the Name column of the Requests table, click the URL of the WebSocket connection.
  2. Click the Messages tab. The table shows the last 100 messages.

To refresh the table, re-click the name of the WebSocket connection under the Name column of theRequests table.

The Messages tab.

The table contains three columns:

Messages are color-coded according to their type:

Analyze events in a stream

To view the events that servers stream through Fetch API, EventSource API, and XHR:

  1. Record network requests on a page that streams events. For example, open this demo page and click any of the three buttons.
  2. In Network, select a request and open the EventStream tab.

The EventStream tab.

To filter events, specify a regular expression in the filter bar at the top of the EventStream tab.

To clear the list of captured events, click Clear.

View a preview of a response body

To view a preview of a response body:

  1. Click the URL of the request, under the Name column of the Requests table.
  2. Click the Preview tab.

This tab is mostly useful for viewing images.

The Preview tab.

View a response body

To view the response body to a request:

  1. Click the URL of the request, under the Name column of the Requests table.
  2. Click the Response tab.

The Response tab.

To view HTTP header data of a request:

  1. Click a request in the Requests table.
  2. Open the Headers tab and scroll down to General, Response Headers, Request Headers, and, optionally, Early Hints Headers sections.

The Headers tab of a request selected from the Requests table.

In the General section, DevTools shows you human-readable status message next to the received HTTP status code.

In the Response Headers section, you can hover over a header value and click the Edit button to override the response header locally.

By default, the Headers tab shows header names alphabetically. To view the HTTP header names in the order they were received:

  1. Open the Headers tab for the request you're interested in. See View HTTP headers.
  2. Click view source, next to the Request Header or Response Header section.

Sometimes the Headers tab shows the Provisional headers are shown... warning message. This may be due to the following reasons:

DevTools can also display only provisional headers due to security reasons.

View request payload

To view the request's payload, that is, its query string parameters and form data, select a request from the Requests table and open the Payload tab.

The Payload tab.

View payload source

By default, DevTools shows the payload in a human-readable form.

To view the sources of query string parameters and form data, on the Payload tab, click view source next to the Query String Parameters or Form Data sections.

The view source buttons.

View URL-decoded arguments of query string parameters

To toggle URL-encoding for arguments, on the Payload tab, click view decoded or view URL-encoded.

Toggle URL-encoding.

View cookies

To view the cookies sent in a request's HTTP header:

  1. Click the URL of the request, under the Name column of the Requests table.
  2. Click the Cookies tab.

The Cookies tab.

For a description of each of the columns, see Fields.

To modify cookies, see View, edit, and delete cookies.

View the timing breakdown of a request

To view the timing breakdown of a request:

  1. Click the URL of the request, under the Name column of the Requests table.
  2. Click the Timing tab.

See Preview a timing breakdown for a faster way to access this data.

The Timing tab.

See Timing breakdown phases explained for more information about each of the phases that you may see in the Timing tab.

Preview a timing breakdown

To view a preview of the timing breakdown of a request, hover over the request's entry in theWaterfall column of the Requests table.

See View the timing breakdown of a request for a way to access this data that does not require hovering.

Previewing the timing breakdown of a request.

Timing breakdown phases explained

Here's more information about each of the phases you may see in the Timing tab:

View initiators and dependencies

To view the initiators and dependencies of a request, hold Shift and hover over the request in the Requests table. DevTools colors initiators green, and dependencies red.

Viewing the initiators and dependencies of a request.

When the Requests table is ordered chronologically, the first green request above the request that you're hovering over is the initiator of the dependency. If there's another green request above that, that higher request is the initiator of the initiator. And so on.

View load events

DevTools displays the timing of the DOMContentLoaded and load events in multiple places on theNetwork panel. The DOMContentLoaded event is colored blue, and the load event is red.

The locations of the DOMContentLoaded and load events on the Network panel.

View the total number of requests

The total number of requests is listed in the status bar at the bottom of the Network panel.

The total number of requests since DevTools was opened.

View the total size of transferred and loaded resources

DevTools lists the total size of transferred and loaded (uncompressed) resources in the status bar at the bottom of the Network panel.

The total size of transferred and loaded resources.

See View the uncompressed size of a resource to see how large resources are after the browser uncompresses them.

View the stack trace that caused a request

When a JavaScript statement causes a resource to be requested, hover over the Initiator column to view the stack trace leading up to the request.

The stack trace leading up to a resource request.

View the uncompressed size of a resource

Check Settings Settings. > Big request rows and then look at the bottom value of the Size column.

An example of uncompressed resources.

In this example, the compressed size of the www.google.com document that was sent over the network was43.8 KB, whereas the uncompressed size was 136 KB.

Export requests data

You can export or copy the list of requests, with filters applied, in several ways described next.

Save all network requests to a HAR file

HAR (HTTP Archive) is a file format used by several HTTP session tools to export the captured data. The format is a JSON object with a particular set of fields.

To reduce the chances of accidental leaks of sensitive information, by default you can export the "sanitized" network log in HAR format that excludes sensitive information such as Cookie, Set-Cookie, and Authorization headers. If required, you can also export the log with sensitive data.

To save all network requests to a HAR file, pick one of the two ways:

Once you have a HAR file, you can import it back into DevTools for analysis in two ways:

Copy a request, a filtered set of requests, or all of them to the clipboard

Under the Name column of the Requests table, right-click a request, hover over Copy, and select one of the following options.

To copy a single request, its response, or stack trace:

To copy all requests:

Options for copying all requests.

To copy a filtered set of requests, apply a filter to the network log, right-click a request, and select:

Copy options for a filtered set of requests.

Change the layout of the Network panel

Expand or collapse sections of the Network panel UI to focus on what's important to you.

Hide the Filters action bar

By default, DevTools shows the Filters bar at the top of the Network panel. ClickFilter to hide it.

The Hide Filters button.

Use big request rows

Use big rows when you want more whitespace in your network requests table. Some columns also provide a little more information when using big rows. For example, the bottom value of theSize column is the uncompressed size of a request and the Priority column shows both the initial (bottom value) and final (top value) fetch priority.

Open Settings Settings. and click Big request rows to see big rows.

Big request rows turned on.

Hide the Overview track

By default, DevTools shows the Overview track. Open Settings Settings. and clear the Show overview checkbox to hide it.

The show overview checkbox.