How http has evolved over time ?
HTTP 0.9 (1991)
No status code
No http headers
Only GET request was supported
Response was only html file
HTTP 1.0 (1996)
POST and HEAD methods were introduced
Status codes were introduced
http headers were introduced
caching
authorization
Content-Type to define body type (Different files were supported)
HTTP 1.1 (1997)
New http methods were introduced PATCH, PUT, DELETE etc
Reuse http connection for example to download multiple images once the connection is established subsequent request can use the same connection to get the images. This improved the latency of a request.
Pipelining support was added. Second request could be made without waiting for the first one. You can make concurrent request but response will come back in the same order. (this issue is fixed in http 2.0)
HTTP 2.0 (2015)
Uses Binary protocol. Less data to parse and interpret as compared to plain uncompressed ascii format
Header compression (HPACK compression technique)
When client request for webpage instead of sending one resource after another. It can send several streams of data. Basically client can decide which data it needs to load first. This method of delivery is known as multiplexing. This is achieved by dividing the data into multiple frames.
Can reset a message, which allows client to stop the request in mid way and start a new request without dropping the existing connection
Server can push the response to client
Can suggest another server, by providing Alt-svc in headers, the server can tell the client that resource can be fetched from another route.
HTTP 3.0
Based on QUIC (Quick UDP internet connections) instead of TCP
In TCP more round trips are required to ensure that client and server are ready for the exchange as compared to QUIC. TCP requires separate round trip for tls connection.
While fetching for response if initial packets are lost than the remaining packets are delayed until initial packets are received.
Uses QPACK for header compression. It is designed to handle streams
While changing network, it does not drop the connection as in tcp connection id is a tuple of client ip address, port, server ip address and server port number. QUIC uses connection identifier randomly generated identifier which does not change even when a different network is used.
QUIC only works with official TLS certificates. Self signed certificates will not work
Quic is based on assumption that client will again connect after some time
SDE 3 at Oracle (OCI) | 23k+ @ LinkedIn | Ex - Infosys Power Programmer | Ex - GFG Author | Tech Author at Medium.com | 6 ⭐ at HackerRank
4moInformative Uday !