2.2 - World Wide Web (1)

The World Wide Web

Overview

  • The Web was conceived in 1989 by Sir Tim Berners-Lee at CERN.

  • Originally intended to create a database for physics research.

  • Transitioned to a hypertext network due to challenges with traditional databases.

How the Web Works

Architecture

  • The Web functions on a two-tier client–server architecture.

    • Client: Uses a software package called a Web browser (e.g., Google Chrome, MS Edge).

    • Server: Utilizes a Web server software package to store information as text files structured by HTML.

Accessing Web Pages

  • Users can access pages by typing a URL (e.g., https://www.mcl.edu.ph/) or clicking a hyperlink.

  • The URL specifies the server's address, and if not specified, refers to the site's homepage.

Communication Protocol

  • The standard protocol for browser-server communication is HTTP (Hypertext Transfer Protocol).

  • Web browser sends an HTTP request containing the URL and other info about the page.

  • The server processes the request and sends back an HTTP response, either the requested page or an error.

Inside an HTTP Request

  • An HTTP request consists of:

    1. Request Line: Starts with a command (e.g., GET), specifies the page, and ends with the HTTP version.

    2. Request Header: Contains optional info like the browser being used and current date.

    3. Request Body: Contains user-submitted information, like form data.

Inside an HTTP Response

  • An HTTP response includes:

    1. Response Status: Contains HTTP version, a status code (e.g., 200 for OK, 404 for Not Found), and a reason phrase.

    2. Response Header: Optional info about the server, date, and URL of the page.

    3. Response Body: Contains the requested web page content.

Important Status Codes

  • 200: OK (request succeeded)

  • 404: Not Found (requested resource does not exist)