How the Web Works

admin@gmail.com3/18/2026, 1:36:49 AM

Introduction

Before writing any code, it helps to understand what actually happens when you visit a website.

How it works

When you type a URL into your browser:

  1. Your browser asks a DNS server for the website’s IP address

  2. It sends an HTTP request to that server

  3. The server responds with files (HTML, CSS, JS)

  4. Your browser renders the page

Key concepts

  • HTTP vs HTTPS: secure vs non-secure

  • Browser: renders websites

  • Server: stores and sends files

Analogy

Think of it like ordering food:

  • You = client

  • Waiter = internet

  • Kitchen = server

Recap

The web is just communication between clients and servers.