How fast web pages load depends not only on file sizes but also on which protocol those files are carried over. The HTTP protocol has evolved over the years from HTTP/1.1 to HTTP/2 and then to HTTP/3, and each version increased speed noticeably. This guide explains modern HTTP protocols and how they speed up a site.
Related reading: Gzip and Brotli compression · Connecting to a server with SSH
The Limits of HTTP/1.1
HTTP/1.1, the standard for decades, became a bottleneck for the modern web. Its biggest problem is head-of-line blocking: on one connection, requests queue, and if one is slow the ones behind it wait. Browsers open multiple parallel connections to the server to work around this, but that wastes resources and adds latency.
HTTP/2: Multiplexing
HTTP/2 solves this problem with its most important innovation, multiplexing: many requests and responses can be carried at once, interleaved, over a single connection. Now one being slow does not make the others wait.
- Multiplexing: A parallel request/response stream on one connection.
- Header compression: Repeating HTTP headers are sent compressed.
- Binary protocol: A binary format instead of text — faster parsing.
- Server push: The server sending resources before the client asks (a feature whose use has declined).
HTTP/3: The New Generation with QUIC
HTTP/3 goes further and changes the transport layer. Instead of traditional TCP, it uses the QUIC protocol, built on UDP. The biggest gain of this is the complete elimination of head-of-line blocking, which in HTTP/2 still remained at the TCP level.
QUIC also speeds up connection setup and lets a connection continue without dropping when the network changes (for example switching from Wi-Fi to mobile data) — an important advantage for mobile users.
Enabling Modern Protocols
HTTP/2 and HTTP/3 work only over HTTPS — meaning a valid SSL/TLS certificate is required first. In Nginx, HTTP/2 is added to the listen line:
# Enabling HTTP/2
listen 443 ssl;
http2 on;
# HTTP/3 (QUIC) — in newer Nginx versions
listen 443 quic reuseport;
add_header Alt-Svc 'h3=":443"; ma=86400';
Verifying the Protocol
You can see which protocol your site uses in the browser's developer tools (Network tab, Protocol column): h2 shows HTTP/2, h3 shows HTTP/3. The command curl --http3 -I https://yoursite.com also tests HTTP/3 support.
Frequently Asked Questions
Does switching to HTTP/2 require code changes?
No. HTTP/2 and HTTP/3 work at the protocol level; you do not need to change your site's HTML, CSS or JavaScript code. Only server configuration is enough.
Should I enable HTTP/3 right away?
HTTP/3 is a mature protocol supported by all modern browsers. If your server supports it, enabling it is safe; clients that do not support it automatically fall back to HTTP/2.
Is compression still needed with HTTP/2?
Yes. HTTP/2 compresses headers but not content (HTML, CSS, JS). Gzip/Brotli content compression is separate and still needed.
Go live with HTTP/2, HTTP/3 and current TLS support on KEYDAL hosting solutions. Explore KEYDAL hosting