๐Ÿ”
๐Ÿ‘ถ Kids๐Ÿ“š Books๐Ÿ“ Blog About Contact ๐Ÿš€ Get Started Free

Internet & Web Basics

Discover how the internet works, what happens when you visit a website, and the key technologies that power the modern web.

The Global Network of Networks

The **Internet** has evolved from an experimental military research project in the late 1960s (ARPANET) into a critical global utility connecting billions of devices. It is a decentralized, cooperative network of networks that allows any computer, smartphone, or smart device to exchange data with any other, anywhere on Earth, in milliseconds. But how does this immense web of fiber-optic cables, routers, and radio waves coordinate so flawlessly? Understanding the basics of the internet and the World Wide Web is essential for anyone pursuing a career in software development, cloud computing, or networking.

Internet vs. World Wide Web: Clearing the Confusion

People often use the terms "Internet" and "Web" interchangeably, but they refer to completely different things. They are related in the same way that highway systems relate to the delivery trucks that drive on them:

  • The Internet: The physical and logical infrastructure. It is the global network of copper cables, fiber-optic lines under the ocean, satellite links, cell towers, and routers. It also defines the fundamental protocol rules (TCP/IP) for moving data. The internet carries many different services, including email (SMTP), file transfers (FTP), online gaming, video calls (VoIP), and the Web.
  • The World Wide Web (WWW): An information service that runs *on top* of the internet infrastructure. Invented by Sir Tim Berners-Lee in 1989, the Web is a collection of digital documents (web pages) that are stored on web servers and linked together by hyperlinks, accessed via the HTTP or HTTPS protocols.

The Client-Server Architecture

The modern web operates primarily on a **Client-Server model**. This is a decentralized architecture where responsibilities are partitioned between two entities:

  • The Client: The device or application requesting information. In most cases, this is the web browser (e.g., Google Chrome, Mozilla Firefox, Apple Safari) running on a user's computer or phone.
  • The Server: A high-performance computer that is constantly powered on, connected to the internet, and running specialized software (like Apache, Nginx, or IIS). The server "serves" or distributes files (HTML, images, stylesheets) and processes database requests on demand when a client asks for them.

Anatomy of a URL

To request a resource from a web server, a client uses a **URL (Uniform Resource Locator)**. A URL is a structured web address that points to the exact location of a file or page on the internet. Let's break down the components of a typical URL:

https://blog.example.com/tutorials/index.html?id=42#conclusion
  • Protocol (Scheme): https:// tells the browser to use the secure Hypertext Transfer Protocol.
  • Subdomain: blog. indicates a specific subsection of the primary domain.
  • Domain Name: example.com is the human-readable name of the website, registered with a domain registrar.
  • Path: /tutorials/index.html points to the specific directory and file structure on the server.
  • Query Parameters: ?id=42 provides extra variables to the server (common for dynamic content).
  • Anchor/Fragment: #conclusion directs the browser to jump to a specific section on the page.

What Happens When You Visit a Website? (The 6-Step Journey)

When you type a URL into your browser and press Enter, a complex sequence of operations is completed in under a second:

Step 1: DNS Resolution

Computers do not communicate using names like `example.com`; they use numeric IP addresses. The browser first sends a query to a **DNS (Domain Name System)** serverโ€”the "phone book of the internet"โ€”to translate the domain name into its corresponding public IP address (e.g., 93.184.216.34).

Step 2: Establishing a Connection (TCP Handshake)

Once the browser has the server's IP address, it initiates a connection using the **TCP/IP protocol**. The browser and server perform a **TCP 3-Way Handshake** (SYN, SYN-ACK, ACK) to establish a reliable, packet-ordered communication channel.

Step 3: Securing the Connection (TLS Handshake)

If the URL uses HTTPS, the client and server negotiate encryption keys using a **TLS (Transport Layer Security)** handshake. This establishes an encrypted tunnel, protecting sensitive user data (like passwords or credit card numbers) from interceptors.

Step 4: Sending the HTTP Request

The browser sends an **HTTP Request** to the server, typically using the `GET` method, asking for the HTML file associated with the path in the URL.

Step 5: Server Processing and Response

The web server processes the request. If the site is dynamic, the server may query a database, compile code, and then generate an **HTTP Response**. The response contains a status code (e.g., `200 OK`) and the requested file content.

Step 6: Parsing and Rendering

The browser reads the HTML file and begins building the **DOM (Document Object Model)** tree. As it encounters links to external stylesheets (CSS) and scripts (JavaScript), it fetches those files and uses its rendering engine to display the layout, colors, images, and interactive elements on your screen.

The Core Trio of Web Technologies

Every web page you visit is built using a combination of three core languages, each handling a distinct layer of the user experience:

Technology Role Analogy Key Syntax Example
HTML (Hypertext Markup Language) **Structure:** Defines headings, paragraphs, images, and links. The skeleton and load-bearing walls of a house. <h1>Welcome</h1>
CSS (Cascading Style Sheets) **Presentation:** Sets colors, fonts, layouts, animations, and responsiveness. The paint, wallpaper, and lighting fixtures of a house. h1 { color: blue; }
JavaScript (JS) **Behavior:** Controls interactivity, animations, API requests, and dynamic updates. The plumbing, electrical wiring, and smart home systems. button.addEventListener('click', runAction);

Essential Web Performance Concepts

To deliver a premium web experience, developers must manage several logical parameters:

  • Cookies: Tiny text files saved by the browser on your device on behalf of websites. They are used to track session states (e.g., keeping you logged in) and user preferences.
  • Local & Session Storage: Modern HTML5 databases built into the browser, allowing websites to store much larger amounts of data locally without sending it back and forth to the server.
  • Caching: Storing copies of web assets (images, stylesheets) in local memory so the browser does not need to redownload them on subsequent visits. A **Content Delivery Network (CDN)** distributes caches of your site on servers across the globe to bring data physically closer to users.

Frequently Asked Questions

What is the difference between IPv4 and IPv6?

IPv4 uses 32-bit addresses (e.g., 192.168.1.1), yielding roughly 4.3 billion unique combinations, which is not enough for the modern world. IPv6 uses 128-bit addresses written in hexadecimal (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334), providing a virtually infinite number of addresses (340 undecillion), ensuring every smart device can have a unique IP.

Why is HTTPS preferred over standard HTTP?

HTTP transmits data in plain text, meaning anyone on the same network (such as public Wi-Fi) can intercept and read passwords or session tokens. HTTPS encrypts all communication between client and server using SSL/TLS, preventing snooping, data tampering, and spoofing.

What are HTTP status codes?

Status codes are three-digit numbers returned by a server indicating the result of an HTTP request. Standard categories include 2xx (Success - e.g., 200 OK), 3xx (Redirection - e.g., 301 Moved Permanently), 4xx (Client Error - e.g., 404 Not Found), and 5xx (Server Error - e.g., 500 Internal Server Error).

What is a REST API?

A REST API (Representational State Transfer Application Programming Interface) is a standardized way for different software services to communicate over the web using HTTP methods (GET, POST, PUT, DELETE) and exchanging data formats like JSON or XML.

What's Next?

Now that you know how the web and client-server model operate, it is time to understand the core software running on all local devices and servers. Read our guide on Operating Systems to discover how kernels, file systems, and scheduling coordinate computer hardware.