Skip to content
Tutorials Center
My learning

Topics

Lesson 17 of 36 ยท Network Panel

Filtering, Throttling and Blocking Requests

Simulate slow networks, offline mode and failing resources: throttling profiles, custom conditions, request blocking and replay, with a runnable transfer-time calculator.

Your development machine is on a fast network with a nearby server. Your visitors are on trains, in rural areas and on crowded Wi-Fi. DevTools lets you simulate those conditions, so you can see what the page does when the network is slow, absent, or when one file fails to load. These are the tools that find bugs you would otherwise only hear about from users.

Network throttling

At the top of the Network panel is a Throttling dropdown, set to No throttling by default. It also appears in the Performance panel and Device mode. Its options:

  • No throttling: your real connection.
  • Presets such as Fast 4G and Slow 4G (and, in some versions, 3G profiles). Each preset sets a download speed, an upload speed and a latency (minimum round-trip delay). The exact numbers change between Chrome releases, so open the Custom list to read the current values.
  • Offline: every network request fails as if the device had no connection.
  • Add... (in Network conditions or the throttling profile editor in Settings): define your own profile with name, download, upload and latency.

Throttling is applied inside the browser: it delays and rate-limits traffic to simulate the profile. It does not model packet loss, radio sleep states, or the CPU limits of a phone. For CPU, use the Performance panel's CPU throttling setting (a later chapter).

Three numbers shape how a page feels:

  • Bandwidth (speed): large files take longer.
  • Latency: even a tiny file needs at least one round trip. A page of 100 small requests on a high-latency connection feels slow no matter how thin the files are, unless requests are combined or run in parallel.
  • Connection setup: DNS, TCP and TLS add several round trips before the first byte.

Network conditions tool

Open the Command Menu and type Show Network conditions (or open the drawer's three-dot menu). This tool offers:

  • A network throttling list (the same as the top bar).
  • Disable cache.
  • User agent: untick "Use browser default" to send a different User-Agent string, to test a mobile site or a crawler's view.
  • Accepted Content-Encodings: untick brotli, gzip or deflate to see how the page behaves when compression is not accepted.

Stand-in: estimating transfer time

How long should a file take on a given profile? A quick approximation is latency + size / bandwidth, with a few extra round trips for connection setup on the first request. It is a simple model, so use it for intuition, not for exact predictions. The numbers below are sample values chosen for the demo, not Chrome's current presets.

JS Stand-in: transfer time by profile

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Compare the lines: the small HTML file takes mostly latency on a slow connection, while the large image takes mostly bandwidth. This is why you reduce both the number of requests and the number of bytes.

Offline testing

Choose Offline and reload (if the page is not cached) or interact with the page. A good web app tells the user what is wrong and recovers. What to look for:

  • A blank page or endless spinner: your fetch has no error handling.
  • Failed requests in red, with (failed) net::ERR_INTERNET_DISCONNECTED.
  • If you use a service worker, does your offline fallback page appear?

Remember that Offline here only affects this tab while DevTools is open.

Blocking requests

Sometimes you need to know "what happens if this file fails?" or "how does the page look without this third-party script?". To block a request:

  • Right-click a request in the Network panel and choose Block request URL or Block request domain.
  • Or open the Network request blocking tool from the Command Menu (type Show Network request blocking), tick Enable network request blocking, and add URL patterns. Wildcards with * are supported.

Reload and the matching requests show (blocked:devtools) in the Status column. Typical experiments:

  • Block your CSS file to see a page with no styles (do headings and links stay usable?).
  • Block a font, to check that the fallback fonts look acceptable and text stays visible.
  • Block an analytics or ad script to check that a slow third party does not break your layout or delay the page.
  • Block a JavaScript bundle to test your <noscript> content and error handling.

Stand-in: pattern blocking

The matching rules of the blocking tool are simple wildcard patterns. This stand-in applies a list of patterns to a list of URLs and prints what would be blocked. It models the idea of * matching anything, not the exact Chrome implementation.

JS Stand-in: which URLs would be blocked?

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Replaying and editing requests

Network gives you shortcuts for repeating a request without touching your app:

  • Replay XHR (right-click a Fetch/XHR request) sends the same request again. Good for a flaky API.
  • Copy then Copy as fetch (or cURL) generates code you can paste into the Console or a terminal and edit. The next lesson uses this heavily.
  • Save all as HAR exports the recording. HAR is covered next.

Using it in a test routine

A practical routine for every new feature:

  1. Load with Disable cache and Fast 4G: is the page usable quickly?
  2. Reload with a slow custom profile: does it show loading states, or a blank screen?
  3. Go Offline: do errors read well?
  4. Block the biggest third-party script: does anything depend on it silently?
  5. Block the API URL: does the UI show a friendly failure?

If you do this once per feature, you will meet far fewer "works on my machine" bugs.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Why can many small requests feel slow on a high-latency connection?

    Latency is paid per round trip, so many requests (especially sequential ones) add a lot of delay.
  2. 2. Which tool lets you see how a page behaves when a script file fails to load?

    Blocking a URL pattern makes matching requests fail so you can watch the page's reaction.
  3. 3. What does the Offline preset do?

    Offline simulates no connectivity for the inspected tab while DevTools is open.
  4. 4. What is a limitation of DevTools network throttling?

    Network throttling only shapes bandwidth and latency; CPU throttling is a separate setting.

Summary

  • Throttling simulates bandwidth and latency; custom profiles and Offline mode cover extremes.
  • Latency hurts many small requests, bandwidth hurts large files; reduce both.
  • Block requests or domains to test failure handling and third-party dependence.
  • Replay, copy as fetch and a short test routine make slow-network bugs visible early.

Next: Request Timing, Copy as cURL and HAR Files