HTTP/1.1 vs. HTTP/2 vs. HTTP/3
Compare the three HTTP versions in use today, see which delays each one removes and learn how to check what your site uses.
Key takeaways
- HTTP/1.1 handles one request at a time on a connection, so browsers open several connections per host.
- HTTP/2 multiplexes many streams over one TCP connection and compresses headers.
- A single lost packet can stall every HTTP/2 stream, because TCP delivers bytes strictly in order.
- HTTP/3 runs over QUIC on UDP, which isolates loss to the affected stream and sets up connections faster.
- Meaning stays the same across versions, so applications rarely need code changes to benefit.
All three versions of HTTP carry the same requests, status codes and headers. They differ in how those messages are packed onto the network. HTTP/1.1 sends them as text, one exchange at a time per connection. HTTP/2 interleaves many exchanges over a single TCP connection. HTTP/3 keeps that idea but moves to QUIC, a newer transport that handles packet loss and connection setup better.
For most site owners the practical answer is simple: enable HTTP/2 and HTTP/3 where your server or content delivery network offers them, keep HTTP/1.1 as a fallback, and spend your effort on page weight and caching.
What stays the same
RFC 9110 defines what HTTP messages mean: methods such as GET and POST, status codes such as 404, and headers such as Cache-Control. Each version has its own document describing how to carry those meanings: RFC 9112 for HTTP/1.1, RFC 9113 for HTTP/2 and RFC 9114 for HTTP/3.
That split is why a web application behind a modern server can talk HTTP/3 to visitors without knowing it. If you need a refresher on the message parts, start with how HTTP requests and responses work.
HTTP/1.1: simple and sequential
HTTP/1.1 arrived in the late 1990s and improved on the earlier style of opening a fresh connection for every file. Connections now persist, so several requests can reuse one TCP and TLS setup.
The limit is ordering. On a given connection the client sends a request and waits for the full response before the next answer can arrive. A specification feature called pipelining let clients send several requests without waiting, but responses still had to come back in order, and it worked poorly enough that browsers do not rely on it.
This is head-of-line blocking: a slow item at the front delays everything behind it. Browsers compensate by opening several parallel connections to each hostname, commonly around six. Developers added their own workarounds, such as combining many scripts into one file, stitching small icons into sprite images and spreading files across extra hostnames.
Its strength is plainness. You can read it directly, debug it with simple tools and find it supported absolutely everywhere.
HTTP/2: many streams, one connection
HTTP/2 replaces the text format with binary frames. Each request and response pair becomes a numbered stream, and frames from different streams can be mixed on the wire. A large image and a small stylesheet download together, and neither has to wait for the other to finish.
Other additions:
- Header compression (HPACK). Requests repeat long headers such as cookies and user agent strings. HPACK keeps shared tables so repeats cost very little.
- Flow control per stream, so one fast transfer does not swamp the receiver.
- Priorities, hints about which resources matter most. The original scheme was complex and unevenly implemented, and a simpler one was standardized later.
- Server push, which let a server send files before being asked. It proved hard to use well, and major browsers have dropped or disabled it.
103 Early Hintsand preload links are the usual alternatives.
In practice, browsers use HTTP/2 only over TLS. The two sides agree on it during the TLS handshake through an extension called ALPN.
The problem HTTP/2 could not solve
HTTP/2 removed blocking at the HTTP layer, but all its streams share one TCP connection. TCP promises to deliver bytes in order. If one packet goes missing, everything that arrived after it waits in a buffer until the missing piece is resent, even data belonging to unrelated streams.
On a clean wired line this rarely shows. On a crowded Wi-Fi network or a weak mobile signal, it can, and in poor conditions six separate HTTP/1.1 connections sometimes cope better than one HTTP/2 connection.
HTTP/3 and QUIC
HTTP/3 solves this by changing the transport. QUIC, specified in RFC 9000, runs over UDP and builds its own reliability, congestion control and stream handling. Because QUIC knows where one stream ends and another begins, a lost packet delays only the streams whose data it carried.
QUIC brings three more benefits:
- Faster setup. Transport and TLS 1.3 negotiation happen together, so a new connection usually needs one round trip before the request can go. A returning client may send data immediately, known as 0-RTT, with the caveat that such data can be replayed and should be limited to harmless requests.
- Connection migration. A connection is identified by IDs, not only by addresses and ports. When your phone moves from Wi-Fi to cellular, the session can survive the change.
- Encryption built in. There is no unencrypted form, and more of the transport's own bookkeeping is hidden from the network.
Header compression becomes QPACK, a redesign of HPACK that tolerates streams arriving out of order. The transport itself gets its own treatment in QUIC explained, and the older trade-off between protocols is in TCP vs. UDP.
Connection setup compared
A site can also announce HTTP/3 support in DNS using an HTTPS record, which lets a browser try QUIC on the very first visit. See SVCB and HTTPS records.
An Alt-Svc header looks like this:
Alt-Svc: h3=":443"; ma=86400 It says HTTP/3 is available on port 443 and that the browser may remember this for 86,400 seconds, one day.
When the newer versions help most
| Situation | Likely effect of upgrading |
|---|---|
| Pages with many small files | Large gain from HTTP/1.1 to HTTP/2 |
| Lossy mobile or Wi-Fi links | HTTP/3 helps with stalls |
| Visitors far from the server | Fewer round trips at setup help |
| One large download on a clean line | Little difference |
| Slow database behind the page | Little difference; fix the server |
Some networks block or throttle UDP, which is why the fallback is essential. Servers also tend to spend more processor time on QUIC than on mature TCP stacks, though implementations keep improving. And no protocol version fixes oversized images or a slow back end; why websites load slowly covers the usual suspects.
A worked example
Say a page needs its HTML plus 60 small files, all from one hostname, and the round trip between visitor and server takes 100 milliseconds. These numbers are only an example, and they ignore transfer time to keep the idea visible.
With HTTP/1.1 and six connections, the browser can have six requests outstanding. Sixty files take about ten waves of requests, or roughly a second of waiting on round trips alone, before counting the time to open the extra five connections.
With HTTP/2, the browser can send all sixty requests at once on the connection it already has. The waiting shrinks toward a single round trip plus however long the bytes take to arrive. The limit is now bandwidth and the server's speed.
Real pages are messier. The browser discovers some files only after reading others, so there are several rounds whatever the protocol. TCP and QUIC also start cautiously and speed up as acknowledgments return, so a brand-new connection cannot use the full line immediately. Shortening those chains of discovery often matters as much as the protocol.
What happens between a CDN and your server
Each hop in a request path negotiates its own version. A visitor may use HTTP/3 to reach a content delivery network, while the network fetches from your origin over HTTP/1.1 or HTTP/2. The visitor still gains where it counts most, on the long and lossy last stretch.
This also means a Protocol column showing h3 says nothing about your own server. To test the origin, connect to it directly from a system you control, or check its logs, which usually record the version of each request. If a reverse proxy sits in front of your application, the same applies inside your own infrastructure.
Translation between versions is routine, but a few details need care. Header names arrive in lowercase from HTTP/2 and HTTP/3, so application code should compare them without regard to case. HTTP/2 and HTTP/3 also forbid connection-specific headers such as Connection and Transfer-Encoding, which a proxy has to strip. Mishandled translation between versions has been a source of request-smuggling flaws, so keep proxy and server software updated.
Old workarounds to reconsider
Several HTTP/1.1 tricks lose their value or turn harmful under multiplexing.
- Domain sharding forces extra DNS lookups and connections and defeats shared compression. Serving from fewer hostnames is usually better.
- Giant combined bundles mean one tiny edit invalidates the whole file in cache. Splitting by how often code changes is a reasonable middle ground. Very small files still carry some overhead each, so thousands of them are not ideal either.
- Sprites and inlined images are less necessary, and inlining prevents separate caching.
Checking and enabling
In browser developer tools, open the Network tab and add the Protocol column if it is hidden. You will see values such as http/1.1, h2 and h3. Reload once or twice, since the first visit may use TCP before the browser learns about HTTP/3.
With curl, if your build supports these options:
curl -sI --http1.1 https://www.example.com/
curl -sI --http2 https://www.example.com/
curl -sI --http3 https://www.example.com/ HTTP/3 support depends on how curl was compiled, so an "option not supported" message says something about your copy, not the site. curl -V lists the features it has.
To enable the newer versions:
- Make sure the site works fully over HTTPS.
- Turn on HTTP/2 in your web server, or confirm your host already has.
- For HTTP/3, check that your server software or CDN supports it.
- Allow UDP port 443 through firewalls as well as TCP 443.
- Confirm in the browser, and watch error logs for a few days.
Many sites get both with a switch at a content delivery network, which then talks to the origin server using whatever version that server supports. How a CDN speeds up a website explains that arrangement.