DEV Community

Seonyoung Chloe (she/they)
Seonyoung Chloe (she/they)

Posted on

40: HTTP

HTTP is a protocol that allows the fetching of resources, such as HTML documents. It is the foundation of any data exchange on the Web and it is a client-server protocol, which means requests are initiated by the recipient, usually the Web browser. A complete document is reconstructed from the different sub-documents fetched, for instance, text, layout description, images, videos, scripts, and more.

Clients and servers communicate by exchanging individual messages (as opposed to a stream of data). The messages sent by the client, usually a Web browser, are called requests and the messages sent by the server as an answer are called responses.


Components of HTTP-based systems

HTTP is a client-server protocol: requests are sent by one entity, the user-agent (or a proxy on behalf of it). Most of the time the user-agent is a Web browser, but it can be anything, for example, a robot that crawls the Web to populate and maintain a search engine index.

Each individual request is sent to a server, which handles it and provides an answer, called the response. Between the client and the server, there are numerous entities, collectively called proxies, which perform different operations and act as gateways or caches,

In reality, there are more computers between a browser and the server handling the request: there are routers, modems, and more.

Thanks to the layered design of the Web, these are hidden in the network and transport layers. HTTP is on top, of the application layer. Although important to diagnose network problems, the underlying layers are mostly irrelevant to the description of HTTP.

Futhermore, Resource From MDN An overview of HTTP

Top comments (0)