Introduction to HTTP/2
HTTP/2 — hypertext transfer protocol version 2 — works much like standard hypertext transfer protocol (HTTP) but more efficient. With HTTP 2.0 protocol, internet users experience improved page load times and it supports more complex web pages. HTTP/2 can be implemented into your technical SEO strategy to improve your website performance.
What is HTTP?
HTTP stands for hypertext transfer protocol and it’s essentially a language that one computer (a server) uses to communicate with another computer (a client) to exchange information.
How HTTP Works
If you want to look something up online, you would first open up a web application called a browser (like Chrome or Safari). Then, you’d type a URL — uniform resource locator — into the browser search box.
So what’s actually happening between when you type a URL into a web browser and when you arrive at your website destination?
The infrastructure of the internet is comprised of a series of requests and responses with specific rules called protocols and when you type in something like “HTTP://example.com” into a web browser, your computer (the client) will execute the hypertext transfer protocol and begin to communicate with another computer (a server).
A lot of the conversation between client and server works through a protocol called “GET” requests. Traditionally, A GET request uses HTTP to ask a server for the HTML code — hypertext markup language — to open a specific URL.
For example, if you wanted to pull up Huckabuy’s website, on a traditional HTTP model, when you type in Huckabuy.com into the search bar, you’re making an HTTP GET request to the Huckabuy server to receive all the HTML code necessary to view Huckabuy.com. The web server will then send the web browser.
Another type of HTTP request is a protocol called a “POST” request. A “POST” request is used to send information and make changes to the information stored by a server. For example, when you fill out a form your web browser sends that data, in plain text, to a server using a “POST” request.
Secure Browsing: SSL & TLS
The world wide web is an open and public system, anyone can use it, and with HTTP information is shared in plain text. Because of this, hackers can view, steal, and tamper with your sensitive data shared over the internet.
That’s why the secure sockets layer and transport layer security were created. These work like a security system around your information to protect it from hackers.
Using HTTPS over HTTP is a security decision. When you use HTTPS, that means that you are using the secure version of HTTP, SSL or TLS is in place, and you are engaged in a secure connection. The connection is verified as secure using a digital SSL/ TSL certificate published by certified authorities. These certified authorities are trusted entities that verify the identities of websites and issue certificates for them.
What is Http/2?
HTTP2 improves web performance and uses fewer network resources by enabling multiple requests to travel through the same connection between a server and client.
As we mentioned, HTTP is how web browsers are able to communicate with web servers to pull up a web page for internet users. When a browser communicates with a server they use what’s called a TCP connection to send requests (like GET requests and POST requests).
HOW TCP CONNECTIONS WORK
TCP stands for transmission control protocol. The TCP connection is an established connection between client and server enables the exchange of information. You could think of it as a phone line. When you call a friend, the phone line enables you to communicate to your friend, back and forth, through that single channel.
HTTP2 vs. HTTP1
With the growing complexity of the internet today, and the dynamic and multimedia nature of most sites, webpages now require multiple request and response actions in order to load a single page.
If there were HTML text elements on a page, an image, and a video, each of these different elements would require a different request from the server in order to receive the information needed to load all three elements of the page.
If the browser were using HTTP1, then the browser would need three TCP connections in order to simultaneously receive the information necessary to complete the page load.
With HTTP version 2, web browsers can make three of these requests through a single TCP connection simultaneously.
The main difference:
- HTTP1 uses several TCP connections to make various requests.
- HTTP 2.0 uses one TCP connection to make various requests.
The Problem with Using Multiple TCP Connections
There are a few problems that come with one … using multiple TCP connections in parallel.
- It leads to TCP congestion and uses up network resources. When web browsers are using multiple connections to process requests, they are occupying a greater portion of the available network resources and, as a result, the network performance for other users takes a hit.
- It can only lead to data duplication which then takes more protocols to ensure that the information is free of errors.
- It can lead to poor resource prioritization, which results in poor performance as web applications become larger and more complex.