Skip to main content

Someone wanted to learn this too, so Grasp built them a personal learning path.

You can keep exploring this one or create your own

Interpreting Network Waterfall Timings for Connection Issues

Hello! Welcome to the first lesson in our new module, "Advanced Network Analysis."

In the previous module, we focused on optimizing what happens after resources are downloaded—analyzing CPU tasks, rendering pipelines, and code execution. Now, we're shifting our attention to the journey your application's resources take before they even arrive at the browser: the network.

Your existing experience with the Network tab provides a great foundation. This lesson builds on that by taking a deep dive into the network waterfall chart. Our goal is to equip you to diagnose connection issues by interpreting the various timing phases for each request, such as DNS lookup, SSL negotiation, and queuing. Understanding this timeline is the first step to identifying and resolving complex network-level bottlenecks.

Understanding the Waterfall: The Building Blocks

The waterfall chart in the Network panel provides a granular, chronological breakdown of how the browser fetches each resource. When you hover over a request's waterfall bar, DevTools reveals the different phases of its lifecycle.

To start, let's watch an excellent deep dive that breaks down each of these phases. We'll go through it in sections to analyze different scenarios.

DevTools Waterfall Deep Dive - Diagnose Your Backend and Improve the Frontend User Experience

This video by Hussein Nasser provides a thorough walkthrough of the waterfall chart. We'll begin with the first section, which explains the fundamental timing phases using a simple, unencrypted HTTP request as a baseline.

Watch from the beginning until 06:41. Focus on understanding the meaning of each phase he explains: Queuing & Stalling: Why a request might have to wait. DNS Lookup: Resolving the domain name. Initial Connection: The TCP three-way handshake. Request Sent & Waiting (TTFB): The time until the server sends the first byte. Content Download: Receiving the response body.

To summarize the key phases from the video:

  • Resource Scheduling (Queuing & Stalling): This is time the browser spends before it can even start the request.
    • Queuing: The request is postponed because it's considered lower priority, or because there are already six TCP connections open for that origin (for HTTP/1.x).
    • Stalled: The request is waiting for any reason other than queuing, often for an available TCP connection to be freed up.
  • Connection Start:
    • DNS Lookup: The time taken to resolve the server's domain name to an IP address. This can be very fast if the result is cached.
    • Initial Connection: The time required to establish a TCP connection, including the three-way handshake (SYN/SYN-ACK/ACK). Long connection times can indicate high network latency (i.e., the server is physically distant).
    • SSL/TLS Handshake: For secure connections (HTTPS), this is the time spent negotiating the encryption. This phase doesn't exist for plain HTTP requests.
  • Request/Response:
    • Request Sent: The time it takes to transmit the HTTP request message to the server.
    • Waiting (Time To First Byte - TTFB): This is a critical metric. It measures the time from when the request was sent until the browser receives the first byte of the response. A long TTFB almost always indicates a slow backend process (e.g., heavy database query, slow API response).
    • Content Download: The time spent downloading the actual response data from the server. This is dependent on payload size and network bandwidth.

Adding Security: The Cost of SSL/TLS

As you know, nearly all modern web traffic is encrypted. This adds a crucial step to the connection process: the SSL/TLS handshake. Let's see how that appears in the waterfall and how it affects timing.

DevTools Waterfall Deep Dive - Diagnose Your Backend and Improve the Frontend User Experience

Continuing with the same video, this next segment directly compares the simple HTTP request with an HTTPS request, clearly illustrating the introduction of the 'SSL' phase.

Watch from 06:41 to 09:14. Notice how the purple 'SSL' bar is now present in the waterfall for the HTTPS request and contributes to the overall connection time.

The key takeaway here is that security has a performance cost. The TLS handshake adds an extra round trip between the client and server, which can add tens or even hundreds of milliseconds to the initial connection, especially on high-latency networks. While unavoidable and necessary, it's an important factor to account for when analyzing initial load performance.

A Complex Case: HTTP/1.1 and Connection Limits

Modern applications load dozens of resources. The way the browser handles these concurrent requests is heavily influenced by the HTTP protocol version. With HTTP/1.1, a browser is limited to opening a maximum of six parallel TCP connections per host. This limitation is a frequent source of bottlenecks, clearly visible in the waterfall as "stalled" or "queued" requests.

DevTools Waterfall Deep Dive - Diagnose Your Backend and Improve the Frontend User Experience

Let's analyze a more complex site with many resources over HTTP/1.1. This part of the video is invaluable for understanding how the browser's connection limit manifests as a 'waterfall' of stalled requests.

Watch from 09:14 to 18:16. Pay close attention to: How only six requests start at once, while the rest are stalled. The distinct 'stair-step' pattern in the waterfall as connections become free and new requests are started. The video's mention of 'domain sharding' as a legacy technique to work around this limit (something you might have encountered in older projects).

This "stair-step" pattern is a classic sign of an application that could benefit from migrating to HTTP/2 or HTTP/3. Those newer protocols use a single TCP connection and multiplex requests over it, eliminating the six-connection limit and the associated head-of-line blocking. We'll explore that more in a future lesson.

Test your understanding!

You are analyzing the network performance of an image gallery page that loads 20 thumbnail images from the same domain. In the waterfall chart, you observe the following:

  • The first 6 image requests start almost immediately.
  • The next 6 image requests show a significant grey "Stalled" bar before they begin downloading.
  • The subsequent images also show similar "Stalled" times, creating a stepped pattern.

What is the most likely cause of this behavior, and what protocol is the site probably using?

Show answer

The most likely cause is the browser's per-host connection limit. The behavior described—6 requests starting in parallel while others are stalled waiting for an open connection—is characteristic of the HTTP/1.1 protocol. The browser opens its maximum of six TCP connections to the host, and as each request finishes, a stalled request from the queue can begin.

A Common Pitfall: The High Cost of Redirects

Redirects are a common part of the web, but they can be silent performance killers. Each redirect introduces a full network round trip, including all the connection phases we've discussed. A chain of redirects can add significant latency before the browser can even start fetching the final, useful resource.

DevTools Waterfall Deep Dive - Diagnose Your Backend and Improve the Frontend User Experience

This final segment from the video demonstrates a real-world scenario where multiple redirects (HTTP to HTTPS, non-www to www) dramatically delay the page load. This is a powerful illustration of what to look for in your own projects.

Watch from 18:16 to 23:25. Observe how each 301/302 redirect triggers a new request, often involving a new DNS lookup and a new connection establishment, adding up to half a second of dead time before the actual content is fetched.

When you see a 301 or 302 status code in your network log, always check the waterfall. If the redirect chain is causing a noticeable delay, the best fix is to update the initial link to point directly to the final URL, eliminating the intermediate steps.

From Analysis to Action: Fixing a Blocking Script

Understanding the waterfall isn't just an academic exercise. It's a diagnostic tool that directly informs code and architecture decisions. A common issue the waterfall reveals is a render-blocking resource, like a JavaScript file loaded in the <head> without an async or defer attribute.

This short video from the official Chrome team shows exactly how to spot and fix this problem.

Advanced Network Analysis with Chrome DevTools #DevToolsTips

Let's connect this theory to a practical front-end optimization. This video shows how the waterfall can reveal a JavaScript file that is blocking the DOM from rendering and how to resolve it.

Watch from 00:46 to 02:01. Notice how the DOMContentLoaded event (the blue vertical line) is delayed until after the JavaScript file has finished loading. After adding async and defer, the DOM content loads much earlier, improving the perceived performance.

This example perfectly bridges the gap between network analysis and front-end development. By observing the relative timing of resource downloads and lifecycle events like DOMContentLoaded, you can identify and fix critical loading bottlenecks directly in your code.

Conclusion

In this lesson, we dissected the network waterfall chart to understand the lifecycle of a network request. By going beyond just looking at total download times, you can now pinpoint specific phases of the connection process that are causing delays.

Key Takeaways:

  • The network waterfall provides a detailed timing breakdown for every request.
  • Key phases include Queuing/Stalling, DNS Lookup, Initial Connection (TCP), SSL/TLS Handshake, Waiting (TTFB), and Content Download.
  • Each phase reveals potential bottlenecks: high TTFB suggests a slow backend; long connection times suggest network latency; and significant stalling points to HTTP/1.1 connection limits.
  • Redirects (status codes 301/302) are costly, as each hop can involve a full new connection cycle.
  • Analyzing the waterfall helps you spot render-blocking resources and provides the evidence needed to implement fixes like adding async or defer to scripts.

In our next lesson, we will build directly on this foundation. We'll explore request priority and queuing to understand how the browser decides the order in which to fetch resources and how we can influence this process to further optimize load performance.

Can't find a good explanation? Sign up and we'll make it for you

Sign up