Frontend System Design1 min readPremium

Web Protocols Cheat Sheet – Frontend System Design

HTTP/1.x vs HTTP/2 comparison

HTTP/1.x and HTTP/2 represent two major versions of the Hypertext Transfer Protocol used for the World Wide Web. HTTP/1.x, with its final iteration being HTTP/1.1, has been the backbone of the web for decades. Its simplicity and text-based nature characterize it, making it easy to use and understand. HTTP/1.1 can reuse a TCP connection with keep-alive, but it still processes one request at a time on that connection (head-of-line blocking), which gets inefficient when a page has many assets.

HTTP/2, on the other hand, introduced several key improvements to enhance web performance and efficiency. One of the most significant changes is the introduction of multiplexing, allowing multiple requests and responses to be sent asynchronously over a single TCP connection, reducing latency and improving page load times. HTTP/2 also incorporates header compression to reduce overhead. It once included server push (sending resources before the client asked), but browsers later dropped server push, so don’t rely on it. Despite these advancements, HTTP/2 maintains high-level compatibility with HTTP/1.x, ensuring that... premium content.

Premium

Keep reading with Premium

Get the rest of this guide plus every premium question, solution, and system design deep dive.

  • All premium solutions
  • System design deep dives
  • Company-specific prep

4.9/5 from our users