How Firefox Uses HTTP/3 and QUIC to Reduce Latency

Mozilla Firefox leverages the modern HTTP/3 protocol, built on the UDP-based QUIC transport layer, to significantly accelerate web browsing. This article explains how Firefox implements these technologies to bypass traditional TCP bottlenecks, combine cryptographic and transport handshakes, eliminate head-of-line blocking, and ultimately reduce connection latency when communicating with modern web servers.

Replacing TCP with UDP and QUIC

Historically, web traffic relied on TCP (Transmission Control Protocol). While reliable, TCP requires a strict, time-consuming sequence of back-and-forth messages before any actual webpage data can be transferred.

Firefox utilizes HTTP/3, which discards TCP in favor of QUIC—a transport protocol running on top of UDP (User Datagram Protocol). Because UDP is connectionless and lightweight, it does not enforce strict delivery rules at the network level. Instead, QUIC handles packet reliability, ordering, and congestion control directly within the browser's application layer. Firefox implements this using "Neqo," Mozilla's custom, memory-safe QUIC engine written in Rust, which allows the browser to establish connections much faster than traditional operating system-level TCP stacks.

Streamlined Handshakes and 0-RTT

In older HTTP/2 connections over TCP, Firefox had to perform two separate handshakes with a web server: one to establish the TCP connection and another to negotiate TLS encryption. This required multiple round-trips between the browser and the server before the first byte of webpage data could be requested.

With QUIC, TLS 1.3 encryption is built directly into the transport layer rather than bolted on top of it. Firefox merges the connection setup and the encryption negotiation into a single handshake. This reduces the initial connection latency to a single round-trip (1-RTT). Furthermore, when connecting to a modern web server that Firefox has visited previously, the browser can utilize Zero Round Trip Time Resumption (0-RTT). This allows Firefox to send encrypted HTTP/3 website requests in the very first packet, effectively reducing connection setup latency to zero.

Eliminating Head-of-Line Blocking

Webpages are made of dozens of individual files, including HTML, CSS, JavaScript, and images. HTTP/2 allowed Firefox to download these files simultaneously over a single TCP connection through a process called multiplexing. However, TCP treats all these files as one single stream of data. If a single network packet was lost in transit, TCP forced the entire connection to pause and wait for that one packet to be retransmitted, stalling the download of all other files. This bottleneck is known as head-of-line blocking.

Firefox’s HTTP/3 implementation eliminates transport-layer head-of-line blocking by using QUIC's native multiplexing. Because QUIC operates over UDP, Firefox can treat every file request as a completely independent stream of data. packets are still encrypted and numbered, but they do not depend on one another across different streams. If a packet containing data for a webpage image is dropped, Firefox only pauses the assembly of that specific image. The browser continues to download and render the rest of the webpage's scripts and stylesheets without any delay.

Seamless Connection Upgrades

Firefox does not blindly guess whether a web server supports HTTP/3, as a failed attempt would increase latency. Instead, the browser uses a fast discovery mechanism to upgrade connections seamlessly.

When you type a URL into Firefox, it checks for specific DNS records (HTTPS/SVCB) that indicate HTTP/3 support. If those are not present, Firefox initiates a standard HTTP/2 connection while simultaneously listening for an Alt-Svc (Alternative Service) header in the server's first response. Modern web servers use this header to inform Firefox that HTTP/3 is available on a specific UDP port. Once notified, Firefox opens a QUIC connection in the background. As soon as the UDP handshake succeeds, Firefox routes all subsequent traffic over HTTP/3 and caches this capability, ensuring future visits to that server benefit from immediate, low-latency connections.