Inspect network activity

Use the Network tool to make sure that resources are being downloaded or uploaded as expected. Inspect the properties of an individual resource, such as the HTTP headers, content, or size.

This is a step-by-step tutorial walkthrough of the Network tool, for inspecting network activity for a page.

For an overview of the network-related DevTools features, see Network features reference.

When to use the Network panel

In general, use the Network panel when you need to make sure that resources are being downloaded or uploaded as expected. The most common use cases for the Network panel are:

  • Making sure that resources are actually being uploaded or downloaded at all.

  • Inspecting the properties of an individual resource, such as the HTTP headers, content, size, and so on.

If you're looking for ways to improve page load performance, don't start with the Network tool. There are many types of load performance issues that aren't related to network activity. Start with the Lighthouse tool, because it gives you targeted suggestions on how to improve your page. See Optimize website speed using Lighthouse.

Open the Network panel

To get the most out of this tutorial, open the demo and try out the features on the demo page.

  1. Open the Inspect Network Activity Demo in a new tab or window:

    The demo.

  2. To open DevTools, right-click the webpage, and then select Inspect. Or, press Ctrl+Shift+J (Windows, Linux) or Command+Option+J (macOS). DevTools opens.

  3. In DevTools, on the main toolbar, select the Console tab. If that tab isn't visible, click the More tabs (More tabs icon.) button:

    The Console.

    You might prefer to dock DevTools to the bottom of your window:

    DevTools docked to the bottom of the window.

  4. Open the Network tool:

    Network tool in DevTools, with DevTools docked to the bottom of the window.

The Network tool is initially empty. DevTools only logs network activity after you open it, and no network activity has occurred since you opened DevTools.

Log network activity

To view the network activity that a page causes:

  1. Refresh the webpage. The Network panel logs all network activity in the Network Log:

    The Network Log.

    Each row of the Network Log represents a resource. By default the resources are listed chronologically. The top resource is usually the main HTML document. The bottom resource is whatever was requested last.

    Each column represents information about a resource. In the previous figure, the default columns are displayed.

    • Status. The HTTP status code for response.

    • Type. The resource type.

    • Initiator. The cause of the resource request. Clicking a link in the Initiator column takes you to the source code that caused the request.

    • Time. The duration of the request.

    • Waterfall. A graphical representation of the different stages of the request. To display a breakdown, hover over a Waterfall.

    Note

    The graph above the Network Log is called the Overview. You won't use the Overview graph in this tutorial, so you can hide it. See Hide the Overview pane.

    After you open DevTools, it records network activity in the Network Log.

  2. To demonstrate this, first look at the bottom of the Network Log and make a mental note of the last activity.

  3. Now, click the Get Data button in the demo.

  4. Look at the bottom of the Network Log again. A new resource named getstarted.json is displayed:

    A new resource in the Network Log.

Show more information

The columns of the Network Log are configurable. You can hide columns that you aren't using. There are also many columns that are hidden by default which you might find useful.

  1. Right-click the header of the Network Log table, and then select Domain. The domain of each resource is now shown:

    Enable the Domain column.

  2. To see the full URL of a resource, hover over its cell in the Name column.

Simulate a slower network connection

The network connection of the computer that you use to build sites is probably faster than the network connections of the mobile devices of your users. By throttling the page, you get a better idea of how long a page takes to load on a mobile device.

  1. Select the Throttling dropdown list, which is set to No throttling by default.

  2. Select Slow 3G:

    Select Slow 3G.

  3. Long-press Reload (Reload.) (or right-click Refresh) and then select Empty cache and hard refresh:

    Empty cache and hard refresh.

On repeat visits, the browser usually serves some files from the cache, which speeds up the page load. Empty cache and hard refresh forces the browser to go the network for all resources. Use it to display how a first-time visitor experiences a page load.

The Empty cache and hard refresh workflow is only available when DevTools is open.

See also Emulate slow network connections in Network features reference.

Capture screenshots

Screenshots display how a webpage looks over time while it loads.

  1. Click the (Network settings.) button and then select the Capture screenshots checkbox:

    The Capture Screenshot checkbox in the Network settings.

  2. Refresh the page again using the Empty cache and hard refresh workflow. See Simulate a slower connection above if you need a reminder on how to do this.

    The Screenshots panel provides thumbnails of how the page looked at various points during the loading process:

    Screenshots of the page load.

  3. Click the first thumbnail. DevTools shows you what network activity was occurring at that moment in time:

    The network activity that was happening during the first screenshot.

  4. Click (Network settings.) again and turn off the Capture screenshots checkbox to close the Screenshots pane.

  5. Refresh the page again.

Inspect the details of the resource

Select a resource to learn more information about it.

  1. Select network-tutorial/. The Headers panel is shown. Use this panel to inspect HTTP headers:

    The Headers panel.

  2. Select the Preview panel. A basic rendering of the HTML is shown:

    The Preview panel.

    The panel is helpful when an API returns an error code in HTML. You might find it easier to read the rendered HTML than the HTML source code, or when you inspect images.

  3. Select the Response panel. The HTML source code is shown:

    The Response panel.

    Tip: When a file is minified, select the Format (Format.) button at the bottom of the Response panel to re-format the contents of the file for readability.

  4. Select the Timing panel. A breakdown of the network activity for the resource is displayed:

    The Timing panel.

  5. Click Close (Close.) to view the Network Log again:

    The Close button.

Search network headers and responses

Use the Search pane when you need to search the HTTP headers and responses of all resources for a certain string or regular expression.

For example, suppose you want to verify that your resources are using reasonable cache policies.

  1. Select Search (Search.). The Search pane opens to the left of the Network log:

    The Search pane.

  2. Type no-cache and press Enter. The Search pane lists all instances of no-cache that it finds in resource headers or content:

    Search results for no-cache.

  3. Click a result to view the resource in which the result was found. If you are looking at the details of the resource, select a result to go directly to it. For example, if the query was found in a header, the Headers panel opens. If the query was found in content, the Response panel opens:

    A search result highlighted in the Headers panel.

  4. Close the Search pane and the Headers panel.

Filter resources

DevTools provides numerous workflows for filtering out resources that aren't relevant to the task at hand:

The Filters toolbar.

The Filters toolbar should be turned on by default. If the Filters toolbar isn't on, click Filter (Filter.) to show it.

Filter by string, regular expression, or property

The Filter text box supports many different types of filtering.

  1. Type png into the Filter text box. Only the files that contain the text png are shown. In this case the only files that match the filter are the PNG images:

    A string filter.

  2. Type /.*\.[cj]s+$/. DevTools filters out any resource with a filename that doesn't end with a j or a c followed by 1 or more s characters:

    A regular expression filter.

  3. Type -main.css. DevTools filters out main.css. If any file matches that pattern, it's also filtered out:

    A negative filter.

  4. Type larger-than:1000 into the Filter text box. DevTools filters out any resource with responses that are smaller than 1000 bytes:

    A property filter.

    For the full list of filterable properties, see Filter requests by properties.

  5. Clear the Filter text box of any text.

Filter by resource type

To focus in on a certain type of file, such as stylesheets:

  1. Select CSS. All other file types are filtered out:

    Show CSS files only.

  2. To also display scripts, press and hold Ctrl (Windows, Linux) or Command (macOS), and then click JS.

    Show CSS and JS files only.

  3. To remove the filters and display all resources again, select All.

For other filtering workflows, see Filter requests.

Block requests

How does a page look and behave when some of the page resources aren't available? Does it fail completely, or is it still somewhat functional? Block requests to find out:

  1. Press Ctrl+Shift+P (Windows, Linux) or Command+Shift+P (macOS) to open the Command Menu.

  2. Type block, select Show Request Blocking, and then press Enter:

    Show Request Blocking.

  3. Click Add Pattern (Add Pattern.).

  4. Type main.css:

    Blocking 'main.css'.

  5. Click Add.

  6. Refresh the page. As expected, the styling of the page is slightly messed up, because the main stylesheet has been blocked.

    In the main.css row in the Network Log, the red text means that the resource was blocked:

    main.css has been blocked.

  7. Clear the Enable request blocking checkbox.

Conclusion

Congratulations, you have completed the tutorial! You now know how to use the Network tool in Microsoft Edge DevTools.

To discover more DevTools features related to inspecting network activity, see Network features reference.

Note

Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons Attribution 4.0 International License. The original page is found here and is authored by Kayce Basques (Technical Writer, Chrome DevTools & Lighthouse).

Creative Commons License. This work is licensed under a Creative Commons Attribution 4.0 International License.