HTTP/2: The standard for faster loading times


HTTP/2 speeds up communication between client and server. More than 20 years have passed since the predecessor protocol HTTP/1.1 came onto the market. Websites have changed massively in this period: There are desktop and mobile versions of websites that are supposed to load quickly. Information is dynamically updated. Multimedia content requires powerful resources. Therefore, a new technology became necessary to meet these demands. In this article you will learn what advantages HTTP/2 has over its predecessor and how you can use the network protocol.

How to enable HTTP/2 on a Virtual Server.

Index of contents

More performance, improved latency and fewer resources

The new network protocol HTTP/2 was developed by the HTTP working group of the Internet Engineering Task Force (IETF). It didn't rewrite the entire HTTP technology: methods, status codes, and semantics that were already in use remained. The working group has merely redefined how the protocol is used during transmission. The focus was on performance, the latency perceived by the end user and the necessary resources for the server and network.

HTTP/2 has been in final development since 2017 and is intended to increasingly replace HTTP/1.1 in order to establish itself as a new standard technology. Currently, the acceptance rate of all browsers at around 96 percent. More than 48 percent of all websites already use the network protocol. It is backwards compatible and can still work with its predecessor. The future will bring further optimizations, because IT experts have been developing since 2018 the next version HTTP/3. Since April 2020, the latest protocol is supported by browsers such as Google Chrome, Firefox or Safari.

The advantages of the new transmission protocol

The primary goal in the development of HTTP/2 was to reduce the loading speed of websites. Fast loading times, especially for mobile sites, increase user-friendliness and have a positive effect on search engine rankings. The higher speed of HTTP/2 is achieved using the following methods:

  • Persistent TCP connection
  • Prioritization of data packets
  • server push
  • header compression
  • Binary instead of text logs

Persistent TCP connection

With HTTP/1.1, the client has to establish multiple TCP connections in order to download different data packages such as CSS files, JavaScript or images from the server. Only when one connection is terminated can the next one start. HTTP/2, on the other hand, establishes a permanent TCP connection between client and server so that data packets can be retrieved simultaneously. The new technology thus significantly reduces the loading times of a website.

Prioritization of data packets

The first version of the network protocol (HTTP/1.1) minified CSS files and JavaScript to reduce bandwidth and increase performance. With HTTP/2, the data packets that are necessary for fast page construction are transmitted first. Since the server requests run concurrently, loading multiple CSS stylesheets is not a problem.

server push

With HTTP/1.1, the browser first requests a page, the server sends an HTML document in response and waits for further requests from the browser for all embedded components. Only then can the server start sending CSS, JavaScript and images. The server push in HTTP/2 enables the server to transfer the files it deems necessary to the browser before the latter makes a request.

header compression

The improved header compression using HPACK helps mobile websites with a variety of media in particular that all information is transmitted with the first request. Then only newly added elements are transferred. The individual HTTP headers are compressed and can thus be retrieved during a request.

binary logs

HTTP/1.1 processes text-based commands to complete requests. Excess data can be transferred in the process. HTTP/2 reduces the amount of data transferred by using binary protocols. This saves time translating information from a text to a binary file and increases overall website performance.

How to test if HTTP/2 is used

The prerequisite for using HTTP/2 as a user is an upgrade to the current version of your browser. For example, if this is Google Chrome, you can find out in a few steps whether a website already supports the HTTP/2 network protocol:

  1. Enter the desired URL in the address bar.
  2. In the browser on the right, open the …. Under additional tools you will find the developer tools. Then click on the Network tab.
  3. Now right-click on the table header and activate the display "Protocol" in the menu.

    Figure - Google Chrome Developement-Tools-Network-HTTP-Protocol

  4. Keep the development tool open and refresh the webpage you are viewing.
  5. In the third column you can now see with which protocol the individual resources are loaded. All resources marked with h2 are loaded using the HTTP2 protocol. Figure - Protocol - Resources for the Host Europe website

SSL certificate as a requirement for using HTTP/2

HTTP/2 ensures faster loading times because files can be transferred simultaneously, thus speeding up communication between client and server. This has a particularly positive effect on mobile websites. In order to be able to use the transfer protocol, developers need an SSL certificate for the respective website. At the same time, this increases security, since the transmission of all data is encrypted.

All Host Europe cPanel WebHosting and cPanel WebServer packages are ready to use HTTP/2. The cPanel WebHosting package Supreme and all cPanel web servers also offer you the practical AutoSSL function. This allows you to have all domains that you operate on the product secured automatically and free of charge with an SSL certificate. But not only the setup, but also the extension of the SSL certificates is done automatically. Once the website has been secured with an SSL certificate on a Host Europe cPanel product, the page content can be accessed via the fast HTTP/2 protocol.

Find out more about Host Europe's cPanel web hosting plans.

Photo credits: Cover image by PAUL SMITH on Unsplash

Leave a Reply

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

Go up Change privacy settings