Y U NO HTTP/2?
"Y U NO" meme

Y U NO HTTP/2?

With the emerge of the internet, the Hypertext Transfer Protocol (HTTP/1.1) came to be in 1997. Necessary for exchanging data between the client and the server this has been (and still is) a major player in the way we consume web services today. Being more than two decades old, the protocol had (has) some major drawbacks, one being the verbosity over the wire.

In 2010 Google launched SPDY, a protocol that later became the basis of HTTP/2. In 2015 the new version of HTTP was published but many web servers did not provide the necessary modules for it, so SPDY was a good derivate. Today all major browsers support HTTP/2! I won't go over the specific changes since there is a ton of articles repeating the same main concepts but the important part here is that with HTTP/2 you will gain in site load times with zero effort! To see the difference in action, go to imagekit site, (in Google Chrome) open Developer Tools, open Network tab and choose Fast 3G for throttling (or find a slow internet connection). Reload the page. Boom- the image in the right hand side reminds me good-old dial up days when you really had to practice your patience, while the image in the left is loaded fairly fast. If your app/site requires a lot of resource files to be loaded then you must read on!

No alt text provided for this image

According to W3Techs HTTP/2 is used only by 31.1% of all the websites. A technology that is almost a decade old (if we count SPDY in), Y U NO USE HTTP/2. Adding HTTP/2 support is really simple. For example, if you are using Nginx as the web server, use the following template as a basis. If you already have SSL on your site, just add http2 to the listen directive and start serving your web pages many times faster than before!

One major drawback for this can be that the protocol requires encryption, an SSL certificate. Fortunately there is many initiatives in the wild to provide free certificate authority services, one being SSLForFree. The downside with this provider is that the free certificate is issued for three months only so you constantly have to monitor when your certs will expire. Alternative solution is to use paid certificate authorities that issue certificates that last longer.

To view or add a comment, sign in

More articles by Markus Karileet

Others also viewed

Explore content categories