With HTTP/1.1, one connection carries one file at a time, so browsers opened up to 6 connections per domain and the rest of the files waited their turn. A page with 80 files was held up by that queue. HTTP/2 (RFC 7540 in 2015, later RFC 9113) was designed to fix it.
What’s new in HTTP/2
| Feature | HTTP/1.1 | HTTP/2 |
|---|---|---|
| Data format | Text | Binary frames |
| Files per connection | One after another | Many in parallel (multiplexing) |
| Headers | Sent in full with every request | Compressed with HPACK |
| Encryption in browsers | Optional | HTTPS only |
Server Push, a feature in the spec for sending files before the browser asked, has been dropped by the major browsers, so don’t rely on it.
Example: is your site using HTTP/2?
curl -sI --http2 https://example.com | head -1
# HTTP/2 200
If you see HTTP/1.1, the server doesn’t support HTTP/2 or the site sits behind a proxy that doesn’t. In the browser, open developer tools, go to Network and add the Protocol column to look for h2.
Common misconceptions
- Old HTTP/1.1 tricks: bundling every CSS file into one, or spreading images across several domains (domain sharding), helps less with HTTP/2 and can even hurt.
- HTTP/2 doesn’t fix a slow server: if generating the page is slow, meaning high TTFB, the protocol won’t change that.
- It changes neither URLs nor content: links stay the same and still start with
https://; visitors notice nothing except faster loading. - It needs HTTPS: without an SSL certificate, browsers fall back to HTTP/1.1.
On ArabyHost
The LiteSpeed web server that ArabyHost runs supports HTTP/2, and because a free SSL certificate (AutoSSL / Let’s Encrypt) is issued automatically for every site, the condition browsers require is met. Confirm it with the command above once HTTPS is active, and read the website speed guide for steps that affect speed more than the protocol itself.
FAQ
Do I need to change my site to use HTTP/2?
No. The browser and server negotiate the protocol automatically and your code stays the same. The server just has to support it and the site has to run over HTTPS.
Does HTTP/2 work without an SSL certificate?
The standard allows it in theory, but the major browsers only use HTTP/2 over HTTPS. In practice your site needs an SSL certificate to benefit.
Is bundling CSS and JavaScript still worth it?
It matters less with HTTP/2, because small files no longer wait in line. Keeping files small and removing unused code still matters.