Have you ever wondered what that “http” is in your web browser?

httpHTTP stands for Hypertext Transfer Protocol and it’s a request-response protocol that drives the web. Think of your browser as the client requesting information. It puts this request into a HTTP message and sends it to the server. The server will then send the response back to the browser. That response may be a picture or a webpage, for example.

The current standard HTTP/1.1 has been around since 1999 and it’s starting to show its age. Back then, webpages were much simpler and required fewer resources. Today however, a webpage can contain many additional resources to show you, the user, what the web developer built. Javascript, CSS, images, videos and even Flash are pulled in and rendered by your browser. This results in many back and forth request/responses and puts a large load on the server and the browser.

There are many techniques that attempt to alleviate the data transfer, but these methods are still at the mercy of HTTP/1.1 and its rules. Images can be compressed, resulting in less data transferred, or a server can tell the browser to store files locally (caching) so that future requests for that resource are pulled locally instead of being transferred again by the server. Web developers can bundle and minify resources. Instead of having 3 or 4 CSS files referenced (which means 3 or 4 request/responses over HTTP), we take those files and make one larger file. We can then take out white space and shorten it up to make it as small as possible.

So far, those solutions have worked but what really needs to happen is an evaluation of HTTP and a new version that is in line with today’s web. Enter HTTP/2.

HTTP/2 has been designed to speed traffic in a number of different ways. First, it transfers all data as binary instead of HTTP 1.1s for text message styles. The format is easier and more compact to transfer, meaning it will take less time to transmit. Next, the new version can deal with multiple data requests at the same time. HTTP/1.1 only allowed one data request at a time, meaning first get HTML, next get CSS, next get Image 1, then Image 2, then Javascript – a lot of back and forth. The result of HTTP/2 style requests is a faster and cleaner data connection. Finally, the new protocol includes server push. Today when you access a webpage, the server sends back HTML, your browser parses it and starts requesting additional resources like images, Javascript and CSS. With server push, a response from the server will send a page’s full content.

In order to realize the benefits, both the client and the server have to communicate via HTTP/2 and luckily the roll out of support has already begun. Realizing the full value is still a year or two away, however. Internet Explorer and “Spartan” will support it in Windows 10, Chrome and Firefox already support it. On the server end, the next version of Microsoft’s IIS will support it, with Apache support expected soon.

There is more to HTTP/2, but hopefully this has introduced to you a very important piece of the web, and how it’s being improved.

Image Credit

Dan’s our web programmer-in-chief, specializing in “back end” systems like Apoxe, our own custom content management system. He’s also a pretty funny guy – if anyone could make “trends in web programming” interesting, it’s Dan.

Email Dan | Read Full Bio

Leave a Reply

Your email address will not be published. Required fields are marked *

2 + 6 =