How Websites Work? Explained! 🤔🌐

Rmag Breaking News

The web is used everywhere, not just in browsers.

Checking emails, tweeting, browsing, video calling etc., all use the internet.

How Websites Work

Entering a URL (e.g., http://codemarch.in) in the browser initiates multiple processes.

These processes can be summarised in four main steps.

Step 1: URL Gets Resolved

Website code is stored on “servers”(A system that provides resources, data, services, or programs to other computers, known as clients, over a network)

Suppose you enter a domain (e.g., https://dev.to/), which is translated to an IP address(A unique identifying number assigned to every device connected to the internet) using DNS(Domain Name System) servers.

Browsers have the addresses of DNS servers built-in.

After getting the IP address, the process moves to the next step

Step 2: Request Is Sent To The Server

With the IP address, the browser sends a request to the corresponding server.

Requests contain information and are sent using the HTTP/HTTPS protocol (A protocol for fetching resources such as HTML documents)

Servers respond to these requests with data, which can include the code for a website or other types of data.

The server’s response is determined by how web developers have programmed the requested website or data.

Step 3: Response From The Server Is Parsed

The browser receives and parses the server’s response.

The type of data (e.g., website, PDF) is identified through metadata(data about data) in the response.

If it’s a website, the data is parsed as HTML, which structures the webpage.

Step 4: Requested Page Is Displayed

The browser renders the website using the HTML data.

CSS adds styles to the HTML structure, making the page visually appealing.

Additional data can be fetched as per instructions in the HTML code.

JavaScript allows dynamic interactions on the page.

Leave a Reply

Your email address will not be published. Required fields are marked *