What is HTTP/2 and does it bring more speed?

Author: HOSTTEST Editorial   | 17 Sept 2021

http/2 and speedDue to its versatility, flexibility, and simplicity, the Hypertext Transfer Protocol (HTTP) developed at the Swiss research centre CERN established itself as the standard for transmitting web pages after being standardised by the Internet Engineering Task Force (IETF) and the World Wide Web Consortium (W3C). Over time, however, disadvantages and weaknesses emerged, necessitating adaptation and further development to meet current conditions. Compared to HTTP/1, there are benefits to using web hosting with HTTP/2 to implement higher security, bandwidth, and speed - although it remains optional, with a majority of websites still using versions HTTP/1.0 and HTTP/1.1.

What is the basic principle of HTTP?

HTTP is a stateless protocol, where all requests are processed independently without consideration of the source or further interaction - such as data transfer between different connections. Alignment between these individual instances can only be achieved at the application level, for example through the use of session identifiers (Session ID) or storing local data as cookies. It is based on information exchanged between the client and server, transmitted in blocks as messages either as a request or response with a result in the form of a valid HTTP status code.

For this reason, HTTP fundamentally transfers content separately and over individual connections - each element such as an image generates a separate and individually processed request. This initially complex and seemingly inefficient process has the advantage of high stability. Building a webpage is possible even if individual requests fail or connections break because browsers and clients autonomously generate and handle content. This feature was particularly important in the first decade of the Internet, as both bandwidth and transmission quality influenced data integrity.

What advantages do later versions have over HTTP/1?

After HTTP/1.0 in 1996 established itself with the Request for Comments (RFC) 1945, weaknesses quickly became apparent in practical use. An initial extension as HTTP/1.1 was relatively swift in 1999 through the publication of RFC 2616, addressing the majority of criticisms by introducing new features such as the status code 307. The evolution to version 2 took nearly two decades and was significantly influenced by the development efforts of corporations like Google and Microsoft, which have a direct interest in fast, performant, and secure communication across local and global networks.

Web hosting with HTTP/2 offers numerous advantages over HTTP/1, representing a real advancement in data transfer and processing in practical use. These include:

  • Ability to combine multiple requests in a single connection
  • Optional transmission of binary instead of character-encoded content
  • Support for data compression using various algorithms
  • Prioritisation of individual connections for streaming or telecommunications
  • Servers can initiate transmissions without prior client request
  • Enhanced security through extensive encryption of communication via TLS
  • Increased speed, efficiency, and IT security in everyday use
  • Many modern browsers exclusively support web hosting with HTTP/2 when encrypted

To fully leverage the advantages over HTTP/1, it is highly recommended to have current encryption via HTTPS, which has increasingly become an essential standard since 2015. In addition to being penalised by Google in search engine rankings, it is also worth noting that practically all popular browsers explicitly identify unencrypted connections as a security risk and only display websites with explicit permission.

What developments does the HTTP/3 protocol bring in the future?

With the hitherto unofficially declared and in development for more than a decade version HTTP/3, a significant change is taking place, which includes a switch from the TCP/IP protocol for network transmission to Google's developed Quick UDP Internet Connections (QUIC). This brings substantial advantages over HTTP/1 and also web hosting with HTTP/2, as it allows for further improvements in speed, security, stability, and efficiency. Among other things, it offers the option to bundle parallel connections from different devices and networks - such as WIFI and GbE LAN - to a dedicated or virtual server. However, HTTP/3 is currently in active development, with the protocol and its features recently being standardised in spring 2021. A widespread implementation is not expected in the short or medium term, not least due to compatibility issues with older devices and software.

Thanks to the new HTTP/2 connection protocol, websites can be loaded faster in the future. This speed advantage is achieved by optimizing the communication between server and client on the technical side. Most internet browsers and web servers already support the new connection protocol.

The development of the new HTTP/2 standard

With HTTP/2 or HTTP/2.0, it is an advancement of the classic HTTP (Hypertext Transfer Protocol) connection protocol. HTTP is a transmission protocol used for sending data within computer networks. It is used to load web pages from the internet into a local web browser like Chrome or Firefox. HTTP is developed by the Internet Engineering Task Force (IETF) and standardised by the World Wide Web Consortium (W3C).

The history of the HTTP connection protocol dates back many years to the last millennium. In 1989, the Hypertext Transfer Protocol was developed at the European nuclear research centre CERN, among others by the British computer scientist Tim Berners-Lee, who laid the foundations for today's World Wide Web. The first official version, HTTP 0.9, was released in 1991. Over the years, the standards HTTP/1.0 in 1996 and HTTP/1.1 in 1999 were established, each enabling further improvements and features in data transmission.

In May 2015, HTTP/2 was introduced as the successor to HTTP/1.1. The protocol aims to optimise data transmission, thus enabling a significant speed advantage when accessing web pages on the internet. Internet giants Google and Microsoft were also significantly involved in the development of the new network protocol standard.

The Advantages of the New HTTP/2 Standard

Unlike its predecessor HTTP/1.1, the HTTP/2 transmission protocol offers several interesting advantages. The new network protocol includes improvements in server speed, as well as security and efficiency in data transmission:

Combining Multiple Requests over a Single Connection

The main advantage of the new transmission protocol is the ability to combine multiple requests over a single connection. The method of data transfer, known as multiplexing, allows for significant optimisation of communication between the server and client. While HTTP/1.1 required a separate TCP connection to be opened for each individual file transfer, HTTP/2 can transmit different page elements such as CSS, JS, or image files in parallel over a single TCP connection. This helps avoid unnecessary data traffic and significantly reduces loading times when building a webpage in the browser.

Intelligent Data Loading

Another advantage of HTTP/2 over HTTP/1.1 is that all data is loaded over a single connection. This is achieved through data packet prioritisation. These packets can be sorted by importance and then transmitted in the appropriate order. The browser informs the server which data needs to be received first to ensure the fast loading of a webpage. Specifically, the loading order can look like this: Important files, such as the basic structure of a webpage consisting of HTML, CSS, or JavaScript, are loaded first so that the webpage can be displayed completely. Less important files, such as social media data, can ultimately be transferred last. This transmission method also significantly optimises loading times.

Compression of Headers

Another improvement introduced within the HTTP/2 standard is the compression of headers. Various additional information about a requested file for transmission is stored in the so-called HTTP header. With the HTTP/1.1 protocol, this data was transmitted uncompressed, unnecessarily inflating the data transfer volume. With HTTP/2, header data can now be transmitted in compressed binary code. This means that overall, less data needs to be exchanged, significantly speeding up data processing.

Server Push Feature

With the new Server Push feature, HTTP/2 offers another advantage. The Server Push process allows the server to send files needed to build a webpage to the browser before the browser even requests them. For example, CSS files required for a fully loaded webpage can be transmitted without the client's prior request. This way, the Server Push feature can prevent time- and resource-consuming roundtrips of data packets between the server and the browser.

Prevention of Head-of-Line Blocking

Head-of-Line Blocking is a potential performance issue that can arise during data transmission over the HTTP/1.1 network protocol. It describes the condition where a delay in transmitting a specific data packet can block all subsequent data packets. The technical restructuring of data transmission under HTTP/2 can prevent the occurrence of Head-of-Line Blocking.

Can the HTTP/2 standard be used already?

Many website operators are now wondering whether the modern HTTP/2 standard is already being used. In order to use the new protocol, it must be activated on the web server and a current browser with HTTP/2 support must be used.

The Apache web server has supported HTTP/2 since version 2.4.17, and the Nginx web server has had HTTP/2 support since version 1.9.5. Microsoft's Internet Information Server can also handle the new protocol since version 10.

The situation is similar with current browsers. Modern browsers like Chrome, Firefox, or Edge have supported HTTP/2 for several versions, although only in combination with HTTP/2 over TLS (HTTPS). Support for Internet Explorer 11 is only possible on a Windows 10 operating system. Apple's Safari browser also supports HTTP/2 only in combination with the encryption method HTTP/2 over TLS (HTTPS).

Website operators who have their own dedicated server with root access can activate HTTP/2 directly on the web server with just a few steps. Customers with traditional web hosting packages or managed Virtual Private Servers depend on the settings of their web host. However, some hosts in the German market already use HTTP/2 on their servers.

Since the protocol is backwards compatible, there is no need to worry about a potentially unreachable website. If the technical requirements for HTTP/2 are not met, the website will automatically be delivered via HTTP/1.1.

To find out if your own website is already being delivered via HTTP/2, you can either inquire with your web hosting provider or use special browser plugins: For Mozilla's Firefox browser, you can use the extension HTTP/2 Indicator for Firefox.

Photo: John Howard on Pixabay

Write a comment


More web hosts


More interesting articles

What is HTTP/3 and when will the standard be released?

HTTP/2 has now become a standard. But when will HTTP/3 be released and what does the new standard bring?

Largest Contentful Paint explained: How to measure and improve LCP

This article provides a comprehensive insight into the importance of LCP and practical ways to measure this metric and t...

What are Load Balancers and how do they work?

Load Balancers help you distribute a huge load of requests. We show you how this works in practice.

What is the cache and how does it affect server performance?

The cache helps with the speed of websites and stores them. We show you how the cache works exactly.

Lazy Loading - What's Behind It?

The loading times of a website should be as minimal as possible. How exactly can Lazy Loading help with this?

Website not reachable - Causes and Measures

Anyone who operates their own website for a longer period of time will sooner or later be confronted with downtime. But ...