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.
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 answerHide 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:
- User enters a URL in the browser (web client)
- Browser uses DNS to locate the IP address of the server
- Browser opens a TCP connection to the web server
- Browser sends an HTTP request over the connection
- Server sends an HTTP response (with the requested web page or resource)
- Browser displays the content in the browser window
[Web Client] ----HTTP Request----> [Web Server]
(Browser) <---HTTP Response---- (Apache/Nginx)
Summary Table
| Feature | Web Client | Web Server |
|---|---|---|
| Location | User's machine | Remote/host machine |
| Role | Sends requests, displays content | Receives requests, sends responses |
| Protocol used | HTTP | HTTP |
| Example | Chrome, Firefox | Apache, 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.
Client Server Architecture
2081 · 5 marks
Describe client server architecture with its types. [5]
Web Basics
Web 2.0
HTTP
2076 · 5 marks
What is HTTP protocol? Define HTTP Request and Response. [5]
Show solved answerHide 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:
- User enters a web address (URL) in the browser.
- Browser uses DNS to locate the IP address of the server.
- Browser opens a TCP connection to the server.
- Browser sends an HTTP Request over the connection.
- Server sends an HTTP Response over the connection.
- 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:
| Component | Description |
|---|---|
| Request Method | Type of action: GET, POST, PUT, DELETE, etc. |
| URL | The address of the resource being requested |
| HTTP Version | Version of HTTP being used (e.g., HTTP/1.1) |
| Headers | Additional information such as host, content-type, cookies |
| Body | Data 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:
| Component | Description |
|---|---|
| Status Line | HTTP version and status code (e.g., 200 OK, 404 Not Found) |
| Headers | Metadata such as content-type, content-length, date |
| Body | The actual content (HTML page, image, data, etc.) |
Common HTTP Status Codes:
200 OK- Request was successful404 Not Found- Requested resource not found500 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.
Make Unit 1 stick
Practice CSC329 with flashcards & quizzes