The web is ready to get a whole new protocol! Since about 1997, the web has been mostly powered by HTTP/1.1. Back in the 90’s, the web had other needs than we have today. The new protocl version, HTTP version 2 or in short HTTP/2, has some much needed improvements in terms of speed, reliability and security.
I would strongly recommend you to upgrade your webserver to also support the HTTP/2 protocol.
Advantages of HTTP/2 over HTTP/1.1
HTTP/2 improves a whole lot over version 1.1. Some key advantages of HTTP/2 include:
- Multiplexing: multiple HTTP requests can be bundled from the browser and be sent to the web server. This results in a reduced number of total active connections. This also means that the overall speed of the page will be greatly reduced as well.
- Encryption: the use of encryption using the TLS protocol is much more efficient with HTTP/2.
- HTTP header compression: compressing headers reduces the overhead of additional requests.
- Server push: instead of waiting on the browser to sent a request to the server (reactive behaviour), the server will pro-actively sent components to the browser.
Overall, HTTP/2 means the server load will go down and the loading times for the end-user will go down drastically as well. And, since it results in a better user experience, it may be advantageous for SEO as well.
Test HTTP/2 support
Now you know what the advantages are of HTTP/2, you might want to see if your website or hosting provider already supports this new protocol.
Test HTTP/2 via command line
Using the command line, you can easily check if a website is using the newest HTTP/2 protocol. Using cURL, execute the following command:
curl --http2 example.org
Online HTTP/2 test tools
There are quite some tools available on the internet that let you enter the website and will show you if this site is using HTTP/2.
- KeyCDN: a free HTTP/2 online test tool to Verify HTTP/2.0 Support
- Akamai: test if your browser support HTTP/2. They also have a demo to compare the pageload time of a HTTP/1.1 versus the HTTP/2 version.
- CloudFlare: for a long time, CloudFlare is one of my favourite companies in terms of innovation and technology. They have a special subdomain to access their site in full HTTP/2 mode.
HTTP/2 browser extension
If you regularly want to get information about HTTP/2 of website you visit, it might be worth installing a browser plug-in. The HTTP/2 and SPDY indicator plug-in for Google Chrome is an excellent tool to visually indicate if the website you are currently using supports HTTP/2 or SPDY.
May I assume that
jeffs@jeff-desktop:~$ curl –http2 http://google.com
curl: (1) Unsupported protocol
jeffs@jeff-desktop:~$
Means that google does *not* support HTTP/2, or does that mean that I am not testing properly?
jeffs@jeff-desktop:~$ curl –version
curl 7.47.0 (x86_64-pc-linux-gnu) libcurl/7.47.0 GnuTLS/3.4.10 zlib/1.2.8 libidn/1.32 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP UnixSockets
jeffs@jeff-desktop:~$
I am running ubuntu 16.04.
I suspect that I am *not* testing it properly, because when I run tcpdump on tcp port 80, I see nothing when I use the –http2 switch (no packets at all), but everything looks normal when I do not use the the –http2 switch. That suggests to me that there is a problem with the curl client.
Jeff,
You need to compile curl with –with-nghttp2. Then “curl –version” will report nghttp2 in Protocols listing. For example:
curl 7.51.0-DEV (x86_64-unknown-linux-gnu) libcurl/7.51.0-DEV OpenSSL/1.0.2j zlib/1.2.8 libssh2/1.7.0 nghttp2/1.14.1 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets
Then –http2 should work fine.
You can use below website to check the HTTP/2 support
https://h2.nix-admin.com/
You might love https://www.dareboost.com/en/website-speed-test-http2-vs-http1
allowing to get a comparison of an HTTP/2-ready web page, loaded both via HTTP/2 and HTTP/1 using a real Chrome browser.
On OSX you can install curl with http2 support using brew install curl –with-nghttp2
I use https://hypestat.com/ to chech HTTP/2 support.
I personally use https://cutewebstats.com to check website audit and other statistics.