Перейти к содержимому
Skip to content
← All articles

HTTP/2 vs HTTP/3: Differences and Performance Comparison

HTTP is the foundation of the modern web. The evolution from HTTP/1.1 to HTTP/2 and HTTP/3 brought significant performance improvements. Understanding the differences between these versions helps you configure your server properly and speed up your website.

Brief History of HTTP

VersionYearTransportKey Innovation
HTTP/1.01996TCPBasic protocol
HTTP/1.11997TCPKeep-alive, chunked transfer, Host header
HTTP/22015TCP + TLSMultiplexing, header compression, server push
HTTP/32022QUIC (UDP)Eliminates transport-level HOL blocking

HTTP/1.1 — The Problems

HTTP/1.1 is simple and well-understood, but has serious performance limitations:

HTTP/2 — Multiplexing

HTTP/2 solves HTTP/1.1's problems through binary framing:

Multiplexing

Multiple requests and responses are transmitted simultaneously over a single TCP connection. Each request is a separate "stream," and streams don't block each other at the HTTP level.

Header Compression (HPACK)

HTTP/2 uses the HPACK algorithm for header compression. Repeated headers (Host, User-Agent, Accept) are encoded as indices, reducing size by 85–90%.

Stream Prioritization

Clients can specify priority for each request. CSS and JS can load with high priority while images load with low priority.

Server Push

The server can send resources before the client requests them. In practice, Server Push is rarely used due to complexity with caching.

HTTP/2's Problem: Head-of-Line Blocking

Although HTTP/2 multiplexes streams at the HTTP level, they all travel over a single TCP connection. If one TCP packet is lost, all streams are blocked until retransmission. This is TCP Head-of-Line (HOL) Blocking.

HTTP/3 — QUIC Instead of TCP

HTTP/3 solves HOL blocking by replacing TCP with QUIC — a new transport protocol built on UDP.

QUIC: Key Advantages

Performance Comparison

ParameterHTTP/1.1HTTP/2HTTP/3
Connection setup1 RTT (TCP) + 2 RTT (TLS)1 RTT (TCP) + 1 RTT (TLS 1.3)1 RTT (QUIC+TLS) / 0-RTT
Parallel requests6–8 connectionsUnlimited (1 connection)Unlimited (1 connection)
HOL blockingHTTP levelTCP levelNone
Header compressionNoneHPACKQPACK
Packet lossBlocks everythingBlocks everythingBlocks only one stream

When HTTP/3 Is Noticeably Faster

How to Check a Site's Protocol

In the Browser

Open DevTools (F12) → Network → right-click column headers → enable "Protocol." You'll see h2 (HTTP/2) or h3 (HTTP/3) for each resource.

Using curl

# HTTP/2
curl -I --http2 https://example.com

# HTTP/3 (requires curl with QUIC support)
curl -I --http3 https://example.com

Online Tools

The HTTP header checker on Enterno.io shows the protocol version in the server response.

Server Configuration

nginx (HTTP/2)

server {
    listen 443 ssl;
    http2 on;
    ssl_certificate /path/to/cert.pem;
    ssl_certificate_key /path/to/key.pem;
}

nginx (HTTP/3)

server {
    listen 443 ssl;
    http2 on;
    listen 443 quic reuseport;
    http3 on;
    add_header Alt-Svc 'h3=":443"; ma=86400';
}

Recommendations

Check your website right now

Check now →
More articles: HTTP
HTTP
Server-Sent Events vs WebSockets: Choosing Real-Time Communication
16.03.2026 · 21 views
HTTP
HTTP Caching Guide: Cache-Control, ETag, Expires
14.03.2026 · 9 views
HTTP
Analyzing Server Response Headers: What They Reveal About a Website
11.03.2026 · 12 views
HTTP
X-Forwarded-For Header: Understanding Client IP Behind Proxies
16.03.2026 · 12 views