-
Notifications
You must be signed in to change notification settings - Fork 0
Notes
-
Stands for HyperText Transfer Protocol.
-
It is the common language between the Clients and the Servers.
-
HTTP was proposed by Tim Berners Lee around 1991.
-
The motivation and high-level design goals for HTTP:
- File Transfer functionality.
- Ability to request an index search of a hypertext archive.
- Ability to refer the client to another server.
-
This makes it a very simple and telnet friendly protocol.
-
The request consisted of a single line, the GET method, and the path of the requested document.
-
The response will be a simple and single hypertext document.
-
Features of HTTP 0.9:
- Client-server, request-response protocol.
- Designed to transfer hypertext documents(HTML).
- The connection between the client and server is closed after every response.
- From 1991 to 1995, there was a rapid evolution of HTML, and the emergence of web browsers also started.
- The first popular browser NCSA Mosiac was also born.
- Then Netscape released the Netscape Navigator 1.0 in 1994.
- Now we needed a protocol that could serve more than just hypertext documents, provide richer metadata about the request and responses, enable content negotiation.
The new changes included the following:
- Request line had HTTP version number followed by the request headers.
- Response status followed by response headers.
The following were the major changes from version 0.9:
-
Request may consist of multiple newline separated header fields.
-
Response object is prefixed with a response status line.
-
Response object has its own set of newline separated header fields.
-
Response object is not limited to hypertext.
-
The connection between server and client is closed after every request
A lot of critical performance optimizations like keepalive connections, chunked encoding transfers, byte-range requests, additional caching mechanisms, transfer encodings, and request pipelining.
- We can have multiple object requests, both delivered on a single connection.
- The connection is keepalive, which allows us to reuse the existing TCP connection for multiple requests to the same host and deliver a much faster end-user experience.
- Here the connection is explicitly closed by sending the close token to the server via the Connection header.
- The HTTP/1.1 protocol also added content, encoding, character set, and even language negotiation, transfer encoding, caching directives, client cookies, plus a dozen other capabilities that can be negotiated on each request.