ArticleslgStudy

science

HTTP/2

HTTP/2 is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand HTTP/2 rather than just read about it. In short: HTTP/2 (originally named HTTP/2.0) is a major revision of the HTTP network protocol used by the World Wide Web. It was derived from the earlier experimental SPDY protocol, originally developed by Google.

Key takeaways

  • HTTP/2 belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect HTTP/2 to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of HTTP/2 from memory before moving on to harder problems.

Reference excerpt

HTTP/2 (originally named HTTP/2.0) is a major revision of the HTTP network protocol used by the World Wide Web. It was derived from the earlier experimental SPDY protocol, originally developed by Google. HTTP/2 was developed by the HTTP Working Group (also called httpbis, where "bis" means "twice" in Latin) of the Internet Engineering Task Force (IETF). HTTP/2 was the first new version of HTTP since HTTP/1.1, which was standardized in RFC 2068 in 1997. The Working Group presented HTTP/2 to the Internet Engineering Steering Group (IESG) for consideration as a Proposed Standard in December 2014, and IESG approved it to publish as Proposed Standard on February 17, 2015 (and was updated in February 2020 in regard to TLS 1.3 and again in June 2022). The initial HTTP/2 specification was published as RFC 7540 on May 14, 2015. The standardization effort was supported by the Chrome, Opera, Firefox, Internet Explorer 11, Safari, Amazon Silk, and Edge browsers. Most major browsers had added HTTP/2 support by the end of 2015. About 97% of web browsers used have the capability (and 100% of "tracked desktop" web browsers). As of July 2023, 36% (after topping out at just over 50%) of the top 10 million websites support HTTP/2. Its successor is HTTP/3, a major revision that builds on the concepts established by HTTP/2.

Goals The working group charter mentions several goals and issues of concern:

Create a negotiation mechanism that allows clients and servers to elect to use HTTP/1.1, 2.0, or potentially other non-HTTP protocols. Maintain high-level compatibility with HTTP/1.1 (for example with methods, status codes, URIs, and most header fields). Decrease latency to improve page loading speed in web browsers by considering: data compression of HTTP headers HTTP/2 Server Push prioritization of requests multiplexing multiple requests over a single TCP connection (fixing the HTTP-transaction-level head-of-line blocking problem in HTTP 1.x) Support common existing use cases of HTTP, such as desktop web browsers, mobile web browsers, web APIs, web servers at various scales, proxy servers, reverse proxy servers, firewalls, and content delivery networks.

Differences from HTTP/1.1 The changes do not require any changes to how existing web applications work, but new applications can take advantage of new features for increased speed. HTTP/2 leaves all of HTTP/1.1's high-level semantics, such as methods, status codes, header fields, and URIs, the same. What is new is how the data is framed and transported between the client and the server. Websites that are efficient minimize the number of requests required to render an entire page by minifying (reducing the amount of code and packing smaller pieces of code into bundles, without reducing its ability to function) resources such as images and scripts. However, minification is not necessarily convenient nor efficient and may still require separate HTTP connections to get the page and the minified resources. HTTP/2 allows the server to "push" content, that is, to respond with data for more queries than the client requested. This allows the server to supply data it knows a web browser will need to render a web page, without waiting for the browser to examine the first response, and without the overhead of an additional request cycle. Additional performance improvements in the first draft of HTTP/2 (which was a copy of SPDY) come from multiplexing of requests and responses to avoid some of the head-of-line blocking problem in HTTP 1 (even when HTTP pipelining is used), header compression, and prioritization of requests. However, as HTTP/2 runs on top of a single TCP connection, there is still potential for head-of-line blocking to occur if TCP packets are lost or delayed in transmission. HTTP/2 no longer supports HTTP/1.1's chunked transfer encoding mechanism, as it provides its own, more efficient mechanisms for data streaming.

History

Genesis in and later differences from SPDY SPDY (pronounced like "speedy") was a previous HTTP-replacement protocol developed by a research project spearheaded by Google. Primarily focused on reducing latency, SPDY uses the same TCP pipe but different protocols to accomplish this reduction. The basic changes made to HTTP/1.1 to create SPDY included "true request pipelining without FIFO restrictions, message framing mechanism to simplify client and server development, mandatory compression (including headers), priority scheduling, and even bi-directional communication". The HTTP Working Group considered Google's SPDY protocol, Microsoft's HTTP Speed+Mobility proposal (SPDY based), and Network-Friendly HTTP Upgrade. In July 2012, Facebook provided feedback on each of the proposals and recommended HTTP/2 be based on SPDY. The initial draft of HTTP/2 was published in November 2012 and was based on a straight copy of SPDY. The biggest difference between HTTP/1.1 and SPDY was that each user action in SPDY is given a "stream ID", meaning there is a single TCP channel connecting the user to the server. SPDY split requests into either control or data, using a "simple to parse binary protocol with two types of frames". SPDY showed evident improvement over HTTP, with a new page load speedup ranging from 11% to 47%. The development of HTTP/2 used SPDY as a jumping-off point. Among the many detailed differences between the protocols, the most notable is that HTTP/2 uses a fixed Huffman code-based header compression algorithm, instead of SPDY's dynamic stream-based compression. This helps to reduce the potential for compression oracle attacks on the protocol, such as the CRIME attack. On February 9, 2015, Google announced plans to remove support for SPDY in Chrome in favor of support for HTTP/2. This took effect starting with Chrome 51.

Development milestones

Encryption HTTP/2 is defined for both HTTP URIs (without TLS encryption, a configuration which is abbreviated as h2c) and HTTPS URIs (over TLS using ALPN extension where TLS 1.2 or newer is required, a configuration which is abbreviated as h2). Although the standard itself does not require usage of encryption, all major client implementations (Chrome, Edge, Firefox, Internet Explorer, Opera, Safari) have stated they will only support HTTP/2 over TLS, which makes encryption de facto mandatory.

Criticisms

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with HTTP/2

Start with the simplest possible case. Write down what HTTP/2 claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to HTTP/2 before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about HTTP/2 ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of HTTP/2

In research
HTTP/2 appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses HTTP/2 in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
HTTP/2 is common in secondary-school and first-year university syllabi. It links to neighbouring topics Application layer protocols, Hypertext Transfer Protocol, Internet properties established in 2015, so understanding it makes those chapters shorter.
In everyday life
Look for HTTP/2 outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “HTTP/2” →

How to study HTTP/2 in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what HTTP/2 means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain HTTP/2 out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is HTTP/2 in simple terms?

HTTP/2 (originally named HTTP/2.0) is a major revision of the HTTP network protocol used by the World Wide Web. It was derived from the earlier experimental SPDY protocol, originally developed by Google.

Why does HTTP/2 matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study HTTP/2?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on HTTP/2.

Tags

  • Application layer protocols
  • Hypertext Transfer Protocol
  • Internet properties established in 2015

Keep exploring