What HTTP/2 and HTTP/3 bring
HTTP/2 and HTTP/3 transfer many files at once over a single connection. With the older HTTP/1.1, files wait for each other and the page loads more slowly.
How it works
HTTP is the language browser and server speak. Under HTTP/1.1 a connection carries only one request at a time. Browsers therefore open several connections in parallel, but only a few per server; every other file waits in the queue.
HTTP/2 sends any number of requests at once over one connection and compresses the headers. Browsers only speak HTTP/2 over HTTPS.
HTTP/3 does the same over QUIC, a protocol based on UDP rather than TCP. If a data packet gets lost on the way, it only holds up the file it belongs to, not all the others. The encrypted connection is also set up faster. This helps most on mobile networks.
The server announces HTTP/3 with the Alt-Svc header. The browser loads the page over HTTP/2 first and then switches for further requests.
bytereport reads which version the page arrives over. HTTP/2 is fine, an Alt-Svc with HTTP/3 is noted on top, and HTTP/1.1 only gives a warning.
What matters
- HTTP/2 is the minimum. Every current browser supports it, and it costs nothing but a line of configuration.
- HTTP/3 is a bonus. It also needs UDP on port 443 to be open, in the firewall too.
- With a CDN, the CDN counts. If a CDN sits in front of your server, the browser only talks to the CDN. HTTP/2 must be on there, and it usually is already.
How to set it up
On shared hosting and with most CDNs, HTTP/2 is switched on or can be enabled at no extra cost; otherwise ask your hosting provider. On your own servers you enable it in the web server; nginx needs version 1.25.1 or later, Apache the mod_http2 module.
nginx has supported HTTP/3 since version 1.25. It needs an additional listen 443 quic reuseport; and the header that announces it:
Alt-Svc: h3=":443"; ma=86400