Suggest an editImprove this articleRefine the answer for “What is the difference between HTTP/1.1 and HTTP/2?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)**HTTP/1.1 and HTTP/2** are different versions of the HTTP protocol. The main difference between them is in speed, efficiency, and the way data is transferred. **Key point:** HTTP/2 is faster and smarter than HTTP/1.1 thanks to multiplexing, a binary format, and header compression, but the "request → response" logic is the same in both versions.Shown above the full answer for quick recall.Answer (EN)Image**HTTP/1.1 and HTTP/2** are different versions of the HTTP protocol. The main difference between them is **in speed, efficiency, and the way data is transferred**. In short: **HTTP/2 is faster and smarter than HTTP/1.1**, but the underlying logic (request → response) is the same in both. --- ## The main difference in simple terms - **HTTP/1.1** Works "in turn": one request first → then the next - **HTTP/2** Works "in parallel": many requests and responses at once over a single connection --- ## HTTP/1.1, how it works Features of HTTP/1.1: - one request, one response - requests are processed **sequentially** - the browser opens **several connections** to the server to speed things up - headers are sent **as text** and are often repeated ### The problem: If one request is slow, the rest **wait their turn** (this is called *head-of-line blocking*). --- ## HTTP/2, what changed HTTP/2 was created to solve HTTP/1.1's problems. ### Main improvements: ### 1. Multiplexing - many requests and responses - **at the same time** - **over a single TCP connection** Nothing gets blocked or has to wait in line. --- ### 2. Binary protocol - HTTP/2 transfers data **in binary format** - instead of as text It is processed faster by computers. --- ### 3. Header compression - headers **are not repeated every time** - they are sent in compressed form Less traffic, faster loading. --- ### 4. Server push (optional) - the server can **send resources on its own** - without waiting for a request For example: - HTML → the server immediately sends CSS and JS --- ## What did NOT change Important for an interview: - the HTTP methods stayed the same (GET, POST, and so on) - the response codes are the same (200, 404, 500) - the URL and API logic **do not change** - for an API developer, there is almost no difference What changes is the **transport**, not the meaning of HTTP. --- ## Short comparison | HTTP/1.1 | HTTP/2 | |---|---| | Sequential requests | Parallel requests | | Multiple TCP connections | A single TCP connection | | Text format | Binary format | | No header compression | Header compression | | Slower | Faster | --- ## Short answer for an interview Remember this wording: > **HTTP/2 differs from HTTP/1.1 in that it supports multiplexing, a binary data format, and header compression, which allows several requests and responses to be transferred at once over a single connection and significantly improves performance**For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.