1 Introduction

Web Technology · Unit 1 · 3 hrs

Introduction

Exam-focused notes for Introduction (Web Technology, CSC329): what the TU syllabus asks and how it has actually been tested, with 6 solved past questions from this unit.

Introduction in short

This unit lays the vocabulary for the whole course: the networks the web runs on, how a browser and a server talk to each other over HTTP, the shapes that client-server systems can take, and the broad shift from a read-only web to the interactive web used today.

Introduction: notes

Web Basics: Internet, Intranet, WWW, Static and Dynamic Web Page

The internet is a vast network of interconnected computer networks that spans the globe, letting any two connected machines exchange data regardless of where they are. It grew out of ARPANET, an early packet-switched network led by Robert W. Taylor, and became the modern internet once Vinton Cerf and Robert Kahn developed the TCP/IP protocol suite that lets dissimilar networks interoperate. The internet is a collection of private, public, academic, business and government networks, and it is built on client-server architecture: a client asks for something and a server supplies it. People use it for email, social networking, chat, information sharing, entertainment and commerce.

An intranet is a private network, built with the same web technologies as the internet (HTTP, browsers, web servers), but restricted to the users of one organization. It lets employees share files, publish internal updates, collaborate on projects and communicate securely, and it is usually shielded from the public internet by a firewall or a proxy such as a border manager.

The World Wide Web (WWW) is a system of interlinked documents (web pages) that sits on top of the internet. It uses the HTTP protocol to move documents between servers and browsers, and it ties them together with hyperlinks and URLs so that a reader can jump from one document, image, video or other resource to another. A web page is normally written in HTML and reached by typing a URL into a browser; a group of related pages published together forms a website.

Web pages are either static or dynamic. A static web page is a fixed HTML file: it looks exactly the same for every visitor and does not change until someone edits the file on the server, so it is simple to build but tedious to keep up to date. A dynamic web page is generated on demand, typically by running a server-side script that pulls current data out of a database, so its content can differ from one request to the next (a different logged-in user, a different date, a different search result) and can be updated from an admin dashboard without touching server files directly.

Web Clients

A web client is any device or program, a desktop browser, a mobile app, or a script, that issues HTTP requests to a web server and consumes the resources it gets back. A web browser (Chrome, Firefox, Edge, Safari) is the most common web client: it builds an HTTP request from a URL the user enters or a link the user clicks, sends it across the network, and then parses and renders whatever the server sends back, HTML, images, stylesheets, scripts. The client never has direct access to the server's files or database; it only ever sees what the server chooses to hand over in the HTTP response.

Web Servers

A web server is a computer, or the software running on it (Apache HTTP Server, Nginx, Microsoft IIS), that listens for HTTP requests and responds to them by returning the requested resource. Its core job is to store, process and deliver web content, most often HTML documents along with their images, stylesheets and scripts, to whatever client asked for them; a single physical machine can host many websites at once. Beyond simply serving files, a web server typically also secures the site's data, mediates access to a backing database, controls bandwidth so no single client can starve the others, and, where needed, executes server-side scripts before the response is sent.

What this unit covers

  • Web Basics: Internet, Intranet, WWW, Static and Dynamic Web Page
  • Web Clients
  • Web Servers
  • Client Server Architecture: Single Tier, Two-Tier, Multi-Tier
  • HTTP: HTTP Request and Response
  • URL
  • Client Side Scripting
  • Server Side Scripting
  • Web 1.0
  • Web 2.0

Web Clients

2082 · 5 marks

Define web clients and web servers with examples. [5]

Show solved answer

Web Clients and Web Servers

Web Client

A web client is a software application (typically a web browser) that runs on the user's machine and sends requests to a web server to retrieve and display web content. The client initiates communication by sending an HTTP request and then receives and renders the response (such as an HTML page, image, or other resource) for the user.

Key characteristics of a web client:

  • Runs on the user's (client) side
  • Uses HTTP protocol to communicate with the server
  • Executes client-side scripts (e.g., JavaScript)
  • Renders HTML, CSS, and multimedia content

Examples of web clients:

  • Google Chrome
  • Mozilla Firefox
  • Microsoft Edge
  • Opera Mini
  • Internet Explorer

Web Server

A web server is a computer program (or the machine running it) that stores, processes, and delivers web pages and resources to clients upon request. When a web server receives an HTTP request from a client, it fetches the requested resource and sends back an HTTP response.

Key characteristics of a web server:

  • Runs on the server side
  • Listens for incoming HTTP requests
  • Processes requests and sends appropriate responses
  • Hosts websites, files, and web applications

Examples of web servers:

  • Apache HTTP Server
  • Nginx
  • Microsoft IIS (Internet Information Services)
  • Border Manager (a multipurpose network security application also used as a proxy server)

How They Work Together (Client-Server Model)

According to the HTTP protocol, the interaction follows these steps:

  1. User enters a URL in the browser (web client)
  2. Browser uses DNS to locate the IP address of the server
  3. Browser opens a TCP connection to the web server
  4. Browser sends an HTTP request over the connection
  5. Server sends an HTTP response (with the requested web page or resource)
  6. Browser displays the content in the browser window
[Web Client]  ----HTTP Request---->  [Web Server]
(Browser)     <---HTTP Response----  (Apache/Nginx)

Summary Table

FeatureWeb ClientWeb Server
LocationUser's machineRemote/host machine
RoleSends requests, displays contentReceives requests, sends responses
Protocol usedHTTPHTTP
ExampleChrome, FirefoxApache, Nginx

Note: This client-server model forms the foundation of the World Wide Web (WWW), which uses HTTP protocol and browsers to access information over the internet.

Open this answer on its own page →

Client Server Architecture

2081 · 5 marks

Describe client server architecture with its types. [5]

Client-Server architecture is a computing model in which a client requests a server for resources. The server hosts, delivers, and manages most of the resources and services to be consumed by the client. It has one or more clients connected to a central server over a network or internet connectio...

Open this answer on its own page →

Web Basics

2080 · 5 marks

Describe the WWW, web client and web server. [5]

--- The World Wide Web (WWW) is an information system that operates over the Internet, allowing users to access and share documents, images, videos, and other resources through web browsers. Key points: - It is based on the Client-Server Architecture, where a client requests resources and a serve...

Open this answer on its own page →

Web 2.0

2079 · 5 marks

Differentiate Web 1.0 from Web 2.0. [5]

--- Feature Web 1.0 Web 2.0 --------- Nature Read-only web Read-write web User Role Users are passive consumers of content Users are active creators and contributors of content Content Static web pages with fixed content Dynamic web pages with frequently updated content Interaction Little to no u...

Open this answer on its own page →

2078 · 5 marks

What are the services provided under web2.0? [5]

Web 2.0 refers to the second generation of the World Wide Web that emphasizes user-generated content, usability, interoperability, and collaboration. Unlike Web 1.0 (static, read-only pages), Web 2.0 allows users to interact with and contribute to web content. --- - Blogs allow individuals to pub...

Open this answer on its own page →

HTTP

2076 · 5 marks

What is HTTP protocol? Define HTTP Request and Response. [5]

Show solved answer

HTTP Protocol: Request and Response

HTTP Protocol

HTTP (Hyper Text Transfer Protocol) is the underlying protocol used by the World Wide Web. It defines how messages are formatted and transmitted, and what actions web servers and browsers should take in response to various commands.

Key characteristics of HTTP:

  • It is based on the client-server model where the client sends a request and the server sends a response.
  • HTTP is implemented over a TCP connection, ensuring reliable data transmission.
  • When a user enters a URL in a browser, an HTTP command is sent to the web server directing it to fetch and transmit the requested web page.

Working of HTTP (Request-Response Cycle)

The step-by-step working of HTTP is as follows:

  1. User enters a web address (URL) in the browser.
  2. Browser uses DNS to locate the IP address of the server.
  3. Browser opens a TCP connection to the server.
  4. Browser sends an HTTP Request over the connection.
  5. Server sends an HTTP Response over the connection.
  6. Browser displays the body of the response in the browser window.

csc329-http-request-response

HTTP Request

An HTTP Request is a message sent by the client (browser) to the server asking for a specific resource. It typically contains:

ComponentDescription
Request MethodType of action: GET, POST, PUT, DELETE, etc.
URLThe address of the resource being requested
HTTP VersionVersion of HTTP being used (e.g., HTTP/1.1)
HeadersAdditional information such as host, content-type, cookies
BodyData sent to the server (mainly used in POST requests)

Example of an HTTP Request:

GET /index.html HTTP/1.1
Host: www.example.com
Accept: text/html

HTTP Response

An HTTP Response is the message sent by the server back to the client after processing the request. It typically contains:

ComponentDescription
Status LineHTTP version and status code (e.g., 200 OK, 404 Not Found)
HeadersMetadata such as content-type, content-length, date
BodyThe actual content (HTML page, image, data, etc.)

Common HTTP Status Codes:

  • 200 OK - Request was successful
  • 404 Not Found - Requested resource not found
  • 500 Internal Server Error - Server encountered an error

Example of an HTTP Response:

HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 1024

<html>
  <body>Welcome to Example!</body>
</html>

Summary: HTTP is the foundation of data communication on the web. The client sends an HTTP Request specifying what resource it needs, and the server replies with an HTTP Response containing the requested resource or an appropriate error message.

Open this answer on its own page →