DEV Community

Cover image for Internet : Behind the scene
Sakshi
Sakshi

Posted on

Internet : Behind the scene

Lets see what happens in client and server side when the the computer is online, means when the computer is linked to internet.

Client side

When we type the URL in browser, the browser create a file with these content

  • GET/HTTP/1.1 (where GET means we are requesting some data from the server and HTTP refers to a protocol that we are using, 1.1 refers to the version of the HTTP request)

  • Host: www.google.com

  • And some other information

This file is converted to binary(you know why), and if you are connected via ethernet, it is sent through wires.

If connected via wifi then this file is converted into a radio signal(you obviously know why). This radio signal is decoded by a router in a very low level, then it is converted to binary and then sent to the servers.

This binary file, goes to the destination and responds only because of the IP address.

One router will send the information to another and this keeps on going until the binary codes reach the destination.

Server side

Now the server has received the binary code file, decodes it and sends response in this format

  • HTTP/1.1 200 ok (where 200 ok is the status)

  • Content-type:type/HTML

  • Body of page

Now this is converted back to binary and sent to IP address that is requesting it. Once the codes are received by client, the browser decoded it in the following way:

First, it checks the status

It starts reading the document from the HTML tag and constructs a Tree-like structure.

The HTML tree is then converted to corresponding binary code and rendered on the screen.

In the end, we see the website front-end.

Thanks for reading.

Top comments (0)