Network conditions: Override the user agent string

Kayce Basques
Kayce Basques
Dale St. Marthe
Dale St. Marthe

Overview

Use the Network conditions panel to override theuser agent string and emulate different network speeds.

Overriding the user agent string changes how the browser identifies itself to web servers. This means the browser can simulate earlier versions or different browsers entirely, which is useful for testing responsive design, compatibility, and feature detection.

Note that overriding the user agent string does not change how Chrome browser functions internally, it changes content that Chrome is served.

Open the Network conditions panel

OpenNetwork conditions panel from theNetwork panel, or manually through DevTools.

To use theNetwork panel to open theNetwork conditions panel, follow these steps:

  1. Open DevTools.
  2. Go to theNetwork panel.
  3. Click theMore network conditions button to open the Network conditions panel.
The 'More network conditions' button highlighted and the Network conditions panel is open.
Figure 1. TheNetwork panel and theNetwork conditions panel

To openNetwork conditions panel manually:

  1. Open DevTools.
  2. Open theCommand menu by pressing:

    • macOS:Command+Shift+P
    • Windows, Linux, ChromeOS:Control+Shift+P
      Command Menu with 'Network conditions' entered.
      Figure 2. The Command Menu
  3. Start typingNetwork conditions, selectShow Network conditions, and pressEnter. DevTools displays theNetwork conditions panel at the bottom of your DevTools window.

Alternatively, in the top right corner, selectMore options >More tools >Network conditions.

Override the user agent string

To override the user agent string from theNetwork conditions panel, follow these steps:

  1. Open theNetwork conditions panel.
  2. In theUser agent section disable theUse browser default checkbox.

    Disabling 'Use browser default.'
    Figure 3. DisablingUse browser default
  3. Select a user agent string from the list, or enter your own custom string.

  4. Refresh the page to view results.

Edit user-agent client hints

The Network conditions panel lets you customize theUser-Agent Client Hints of a selected user agent string.

To use this feature, follow these steps:

  1. Select a user agent string from the list, or enter your own custom string.
  2. Click theUser agent client hints drop-down. A form will appear with the relevant values autofilled.

    The User-Agent Client Hints form.
    Figure 4. The User Agent Client Hints form
  3. Edit the form by clickingdelete to delete items, andAdd brand to add to theUser agent andFull version lists.

  4. When done, click theUpdate button at the bottom of the form.

  5. Refresh the page to view results.

Throttle the network speed

To throttle the network speed from theNetwork conditions panel click theNetwork throttling list, then select eitherFast 3G,Slow 3G oroffline.

Network throttling dropdown in the Network conditions panel.
Figure 5. Network throttling list in the Network conditions panel

Additionally, theNetwork panel lets you throttle network speed in a similar way, just open theNetwork panel and select the speed you want from theThrottle list in the action bar.

Network throttling dropdown in the Network panel.
Figure 6. Network throttling list in the Network panel

You can also use thePerformance panel to throttle network speed. Open the Performance panel, clickSettings and then selectFast 3G orSlow 3G from theNetwork list.

Network throttling dropdown in the Performance panel.
Figure 7. Network throttling list in the Performance panel

Set your own custom network throttling parameters by creating aNetwork Throttling Profile. To learn how, seeThrottling.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024-05-24 UTC.