How The Web Works-An Introduction

How The Web Works-An Introduction

ยท

3 min read

The internet has become the integral part of our life but do you know how it works under the hood ๐Ÿค” If not, I am here to tell you through my blog how the vast internet works.

Client & Server

image.png

The web is comprised of client and servers. Clients are the web users and servers are those computers which store the web pages, sites and apps. When the client searches for a website he makes a request to the server for that site and that server responds by giving the client the requested site.

All between client & server

1. Internet Connection

Its like a connection wire between your computer and the whole web.

2. TCP/IP

Transmission control panel and internet protocol are communication protocols/rules that define how data should travel across the internet. Its like car/bike that takes us to our destination.

3.DNS

Domain Name System is like an address book for websites. When you type a web address in your browser, the browser looks at the DNS to find the requested website's IP address so it can send HTTP messages to the right server in which the website exists.

4.HTTP

Hypertext Transfer Protocol is an application protocol which defines how the client and server communicate. It is like the language you use to order your goods.

5.Component files

A website is made up of different files. The two main types are:

  • Code files: Contains HTML, React/Vue/Angular JavaScript files.
  • Assets: It is a collection of images, video, document, pdfs used in the website.

So what happens, exactly?

how-the-web-works-big-picture.webp

When you type a web address into your browser:

  • The browser goes to the DNS server, and finds the IP address (real address) of the server that the website lives on.
  • The browser sends an HTTP request message to the server, asking it to send a copy of the website to the client . This message, and all other data sent between the client and the server, is sent across your internet connection using TCP/IP.
  • If the server approves the client's request, the server sends the client a "200 OK" message, which means "Of course you can look at that website! Here it is", and then starts sending the website's files to the browser as a series of small chunks called data packets.
  • The browser assembles the small chunks into a complete web page and displays it to you.

What is DNS

Real web addresses are not the strings you type into your address bar to find your favorite websites. They are special numbers that look like this: 63.245.215.20.

This is called an IP address, and it represents a unique location on the web. However, it's not very easy to remember that's why Domain Name Servers (DNS) were invented. These are special servers that match up the string web address you type into your browser with the IP address of that server.

What are Packets

When data is sent across the web, it is sent in thousands of small chunks. There are multiple reasons why data is sent in small packets. They are sometimes dropped or corrupted, and it's easier to replace small chunks when this happens. Additionally, the packets can be routed along different paths, making the exchange faster and allowing many different users to download the same website at the same time. If each website was sent as a single big chunk, only one user could download it at a time, which obviously would make the web very inefficient and not much fun to use.

So this is all about how the web works. There are many more intricacies and depth which I left to keep the blog beginner friendly.

You can connect with me on twitter,linkedln

Want to know what I do besides writing blogs checkout my Github.

Till next take care.....bye๐Ÿ‘‹

ย