🏠 Home

Why HTTP versions matter? http/1 vs http/2 vs http/3

HTTP versions matters to frontend development because it drastically improves overhead of downloading assets/files & sending requests.

Http versions


* HTTP/3 is in draft because it’s waiting for final author review where 1 of the 3 author has approved.

Around 73% of users are using browsers that supports HTTP/3 protocol. (source)


Key take-aways for HTTP/1.1:

  • Opens several TCP connections for same server for parallel requests
  • Text protocol: connection in text mode
  • HTTP headers are not compressed


Key take-aways for HTTP/2:

  • Backward compatible with HTTP/1.1
  • Multiplexed & concurrent
    • single multiplexed TCP connection for same server; it means all requests are done with a single TCP connection
  • Binary protocol: encodes request & response messages into binary
    • connection in binary reduces transferred data
  • Stream prioritization
    • allow browser to indicate priorities of what to download first
  • HPACK compression
    • HTTP headers are compressed, hence better performance (ie. consider heavy cookies)
  • Server push
    • it means server can send resources to the client before client requests them
  • Can be implemented without HTTPS


Key take-aways for HTTP/3:

  • backward compatible with HTTP/2
  • based on QUIC as a transport layer (UDP)
    • reduce latency & improve efficiency
    • utilises UDP
  • QPack compression
    • redesign of HPack that reduces head-of-line blocking
  • quicker handshake than HTTP/2
  • must be implemented in secure & encrypted


  • head-of-line blocking is where new request is blocked because first request is not completed yet
  • using QUIC means even if there are packet loss, other requests are not stopped because of it


For each HTTP version, we have to use different strategies to improve performance.

Communications protocolTCPTCPQUIC (UDP)
Header compression-HPACKQPACK
Message formattextbinarybinary