HTTP/2

What is HTTP/2?

HTTP/2 is a major revision of the HTTP network protocol used for transferring web content over the Internet. It was developed to address the limitations and performance issues of its predecessor, HTTP/1.1. HTTP/2 was standardized by the Internet Engineering Task Force (IETF) in May 2015 as RFC 7540.

HTTP/2 aims to make web applications faster, more responsive, and efficient by reducing latency, improving parallelism, and optimizing the use of network resources. It is widely supported by modern web browsers and servers, and its adoption continues to grow.


What are the main features of HTTP/2?

There are several new features in HTTP/2:

  • Multiplexing: HTTP/2 allows multiple requests and responses to be sent and received concurrently over a single TCP connection. This eliminates the need for multiple connections, reducing latency and improving overall efficiency.
  • Binary Protocol: HTTP/2 uses a binary framing layer, whereas HTTP/1.1 used a text-based format. This change improves parsing efficiency and reduces bandwidth usage.
  • Header Compression: HTTP/2 utilizes a technique called header compression, which significantly reduces the overhead of sending repetitive header data with each request and response. This helps improve network performance.
  • Server Push: HTTP/2 introduces server push, where the server can proactively send additional resources to the client before they are explicitly requested. This feature reduces the need for subsequent round trips and speeds up the delivery of web content.
  • Prioritization: HTTP/2 allows the client to assign priority to individual resources, indicating which resources should be loaded first. This enables more efficient resource allocation and helps improve the overall user experience.
  • Stream Dependencies: HTTP/2 introduces the concept of stream dependencies, where resources can depend on each other. This allows for better management of resource loading and improves page rendering speed.

How do I know if my browser is using HTTP/2 to access a web site/web application?

To determine if your browser is using HTTP/2 to access a web site, you can follow these steps:

  • Open the web site in your browser.
  • Right-click on the page and select "Inspect" or "Inspect Element" from the context menu to open the browser's developer tools.
  • In the developer tools, navigate to the "Network" tab.
  • Reload the page by either pressing F5 or clicking the reload button.
  • Look for the column labeled "Protocol" or "Version" in the Network tab. This column displays the protocol version used for each network request.
  • If you see "h2" or "HTTP/2" in the Protocol/Version column, it means that HTTP/2 is being used to access that particular resource.

How do I know if my browser is using HTTP/2 to access a web site/web application?

There could be several reasons why some content is loaded over HTTP/1.1 even if your browser supports HTTP/2:

  • Server Configuration: The website's server may not be properly configured to support HTTP/2.
  • Mixed Content: If a webpage contains resources (such as images, scripts, or stylesheets) that are hosted on a server that does not support HTTP/2 or is not properly configured for it, those resources will be loaded over HTTP/1.1.
  • CDNs or Proxies: If intermediate systems like CDNs or Proxies do not support HTTP/2, the content may be delivered over HTTP/1.1.
  • Content Caching: If content is cached over HTTP/1.1, it may continue to use HTTP/1.1 and not HTTP/2.

To learn more about HTTP/2 and see the performance benefits that accrue from using HTTP/2, please read this blog: https://www.eginnovations.com/blog/page-load-speeds-http2/