Chapter I
Introduction
College of Information and Communication Technology
Can Tho University
Dr. Trieu Thanh Ngoan
ĐẠI HỌC CẦN THƠ [Link]
CTU
1 Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
CONTENT
1. Overview
2. Components of a Web-based System
3. HTTP Protocol
4. URL
5. HyperText & HyperLink
6. Web Cache
ĐẠI HỌC CẦN THƠ [Link]
CTU
2 2
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
CONTENT
1. Overview
2. Components of a Web-based System
3. HTTP Protocol
4. URL
5. HyperText & HyperLink
6. Web Cache
ĐẠI HỌC CẦN THƠ [Link]
CTU
3 3
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
1. OVERVIEW
Web?
World Wide Web, www, web, w3 is an
Internet service
Is the most popular and convenient form of
information organization
o Allows searching for information resources through hypertext using
hyperlinks.
o These are text documents usually stored with extensions such as
.html, .htm, etc.
o The Web was invented and put into use around 1990 by British
academic Tim Berners-Lee at CERN. Since then, the web has
developed rapidly and become a hypermedia system.
ĐẠI HỌC CẦN THƠ [Link]
CTU
4 4
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
WEB GENERATIONS
Web 1.0 (Static web):
• Information is one-sided
• Websites are mainly owned by companies,
organizations, and news agencies.
• HTML
• Lack of interactivity
Web 2.0 (Dynamic web):
• Information is bidirectional
• It is community-oriented
• Server-client technology, content delivery
mechanisms, and communication
• The web serves as a platform, capable of running
any application
• It can run on multiple devices with a rich
application interface
ĐẠI HỌC CẦN THƠ [Link]
CTU
5 5
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
WEB GENERATIONS
Web 3.0 (Web of Data): More Intelligent Web
• An extension of Web 2.0
• Semantic web applications
• Real-time web applications
ĐẠI HỌC CẦN THƠ [Link]
CTU
6 6
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
WEB DEVELOPMENT
ĐẠI HỌC CẦN THƠ [Link]
CTU
7 7
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
CONTENT
1. Overview
2. Components of a Web-based System
3. HTTP Protocol
4. URL
5. HyperText & HyperLink
6. Web Cache
ĐẠI HỌC CẦN THƠ [Link]
CTU
8 8
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
2. COMPONENTS OF A WEB-BASED SYSTEM
ĐẠI HỌC CẦN THƠ [Link]
CTU
9 9
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
Web client
Web Browser: Internet Explorer, Firefox, Chrome, Safari, Opera,
Netscape, Mozilla, …
• Installed on the client machine.
• Sends web requests to the Web Server.
• Receives results from the Web Server.
• Displays the results.
ĐẠI HỌC CẦN THƠ [Link]
CTU
10 10
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
Web client
Source: [Link]
ĐẠI HỌC CẦN THƠ [Link]
CTU
11 11
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
Web Browser
Addressing the diversity of web browsers:
• Don't invest in minor differences
• Follow common standards
• Use HTML with correct syntax, precise and clear structure
• Avoid using HTML elements that are specially supported by only one
or two browsers
ĐẠI HỌC CẦN THƠ [Link]
CTU
12 12
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
Web server
Web Server: Apache, Tomcat, NGINX, MS Internet
Information Server, lighttpd, ...
• Installed on a server, providing a Web service.
• Listens for Web requests on a port (80).
• Processes the requests.
• Generates results and returns them to the Web browser.
ĐẠI HỌC CẦN THƠ [Link]
CTU
13 13
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
CONTENT
1. Overview
2. Components of a Web-based System
3. HTTP Protocol
4. URL
5. HyperText & HyperLink
6. Web Cache
ĐẠI HỌC CẦN THƠ [Link]
CTU
14 14
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
3. HTTP PROTOCOL
HyperText Transfer Protocol
• Used for communication between a web browser and a web server
• An application layer protocol in the OSI model, operating on top of the TCP/IP
protocol
• There are two types of messages: request (web browser), response (web server).
• HTTP servers operate on port 80 by default
• It is a stateless protocol
• Can be used to transmit any type of data
• Versions: HTTP/0.9, HTTP/1.0, HTTP/1.1, HTTP/2, HTTP/3
ĐẠI HỌC CẦN THƠ [Link]
CTU
15 15
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
HTTP MODEL
ĐẠI HỌC CẦN THƠ [Link]
CTU
16 16
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
ĐẠI HỌC CẦN THƠ [Link]
CTU
17 Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
17
HTTP MODEL
Web pages often contain more than one object => requesting a
web page typically generates a series of HTTP messages for
each object on the page.
ĐẠI HỌC CẦN THƠ [Link]
CTU
18 18
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
ĐẠI HỌC CẦN THƠ [Link]
CTU
19 Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
19
HTTP Message
Plain text, including:
• Request line/Status line (Start line): This is the
first line, containing the client's request command or
the server's response status code.
• Header: This may be absent or have multiple lines,
each with the following format:
<name>: <value>
• A blank line: a blank line used to distinguish between the header and the
body
• Body: may or may not be present, and can contain any type of data (plain
text, binary)
* Header: for more information:
[Link]
ĐẠI HỌC CẦN THƠ [Link]
CTU
20 20
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
HTTP Request Message
ĐẠI HỌC CẦN THƠ [Link]
CTU
21 21
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
HTTP Request Message
In which:
• Method: the command that the client wants the server to execute
• URL: resource address
• Version: the HTTP version that the message uses
• Cr (carriage return) and lf (line feed): return to the beginning of the line and
move to the next line, marking the end of the message.
Method Description
GET Retrieve the document specified in the URL
HEAD Similar to GET, but the return message doesn't have a body.
POST Provide information to the server
PUT Upload the document to the server and place it in the location
specified in the URL
DELETE Delete the document located at the URL on the server.
ĐẠI HỌC CẦN THƠ [Link]
CTU
22 22
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
GET vs POST
GET POST
BACK Harmless Data will be re-submitted (the
button/Reload browser should alert the user that the
data are about to be re-submitted)
Bookmarked Can be bookmarked Cannot be bookmarked
Cached Can be cached Not cached
Encoding type application/x-www- application/x-www-form-urlencoded
form-urlencoded or multipart/form-data. Use multipart
encoding for binary data
History Parameters remain in Parameters are not saved in browser
browser history history
ĐẠI HỌC CẦN THƠ [Link]
CTU
23 23
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
GET vs POST
GET POST
Yes, when sending data, the GET method
Restrictions
adds the data to the URL; and the length
on data No restrictions
of a URL is limited (maximum URL
length
length is 2048 characters)
Restrictions No restrictions. Binary data is
Only ASCII characters allowed
on data type also allowed
GET is less secure compared to POST
POST is a little safer than GET
because data sent is part of the URL
because the parameters are not
Security
stored in browser history or in
Never use GET when sending passwords
web server logs
or other sensitive information!
Visibility Data is visible to everyone in the URL Data is not displayed in the URL
ĐẠI HỌC CẦN THƠ [Link]
CTU
24 24
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
HTTP Request Message
ĐẠI HỌC CẦN THƠ [Link]
CTU
25 25
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
HTTP Response Message
ĐẠI HỌC CẦN THƠ [Link]
CTU
26 26
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
Status codes
Code Type Reason
1xx Information request has been received and continue processing
request was successfully received, understood, and
2xx Success
processed
3xx Redirection further action is required to complete the request
4xx Client error request contains an error or cannot be fulfilled
5xx Server error server failed to fulfill a valid request
ĐẠI HỌC CẦN THƠ [Link]
CTU
27 27
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
Status code
HTTP status code Description
200 OK. Document returned correctly.
Redirect. Go someplace else to get the
302
resource.
404 Not Found. Can't find this resource.
More status codes: [Link]
ĐẠI HỌC CẦN THƠ [Link]
CTU
28 28
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
HTTP Response Message
ĐẠI HỌC CẦN THƠ [Link]
CTU
29 29
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
ĐẠI HỌC CẦN THƠ [Link]
CTU
30 Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
30
CONTENT
1. Overview
2. Components of a Web-based System
3. HTTP Protocol
4. URL
5. HyperText & HyperLink
6. Web Cache
ĐẠI HỌC CẦN THƠ [Link]
CTU
31 31
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
4. URL
Web resources
ĐẠI HỌC CẦN THƠ [Link]
CTU
32 32
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
URL
URL (Uniform Resource Locator) A resource locator is an address
used to locate resources on the Internet.
General syntax:
<protocol>://<user>:<password>@<host>:<port>/<path>;<params>?<query>
In which:
protocol: http, file, ftp, mailto,..
host: the name of the server providing the service Web, FTP,..
path: a local path pointing to a resource on the server
params: include name/value pairs used to provide any additional information
needed to access the resource.
query: used to send parameters to the application on the server, the common
format is : name1=value1[&name2=value2][&…]
ĐẠI HỌC CẦN THƠ [Link]
CTU
33 33
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
URL
ĐẠI HỌC CẦN THƠ [Link]
CTU
34 34
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
Example URL
HTTP:
[Link]
Example:
[Link]
[Link]
FTP:
[Link]
Example:
[Link]
[Link]
[Link]
ĐẠI HỌC CẦN THƠ [Link]
CTU
35 35
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
Example URL
Email:
[Link]
Example:
[Link]
File on disk:
[Link]
Example:
[Link]
[Link]
ĐẠI HỌC CẦN THƠ [Link]
CTU
36 36
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
Absolute URL & Relative URL
Absolute URL:
is the full address of a resource.
includes the protocol, hostname, path, and filename.
Example: [Link]
Relative URL:
is not the full address of a resource.
specifies the resource location relative to the current document’s URL
Example:
The current viewing webpage:
[Link]
Relative URL = [Link]
Missing information [Link]
Browser automatically determines absolute URL:
URL= [Link]
ĐẠI HỌC CẦN THƠ [Link]
CTU
37 37
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
Absolute URL & Relative URL
Relative URL:
Example:
The current viewing webpage:
[Link]
Relative URL= ../[Link]
Missing information [Link]
Browser automatically determines absolute URL:
URL= [Link]
Notation:
"/" root directory.
"../" the parent directory
ĐẠI HỌC CẦN THƠ [Link]
CTU
38 38
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
URL Encoding
• URLs can only be sent using ASCII character-set
• URLs contain characters outside the ASCII set must be
converted into a valid ASCII format => URL Encoding
• URL Encoding: replaces unsafe ASCII characters with a
"%" followed by two hexadecimal digits ("*" => %2A)
• URLs cannot contain spaces => replaces with a "+" or %20
VD: [Link]
URL Encoding Reference:
[Link]
ĐẠI HỌC CẦN THƠ [Link]
CTU
39 39
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
CONTENT
1. Overview
2. Components of a Web-based System
3. HTTP Protocol
4. URL
5. HyperText & HyperLink
6. Web Cache
ĐẠI HỌC CẦN THƠ [Link]
CTU
40 40
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
5. HYPERLINK & HYPERTEXT
HyperText: a system that links information elements through
triggerable text links, also known as hyperlinks.
HyperLink: a connection between one information element
and another. Elements can be:
Text, hypertext, websites
Audio, images
Files, ActiveX objects (Word, Excel, etc.)
Executable programs written in languages such as Java, Java Applet,
ASP, [Link], PHP, etc.
ĐẠI HỌC CẦN THƠ [Link]
CTU
41 41
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
Hyperlink types
• Internal link: A link within a -------------------
document that points to a piece of ------------------- Hyperlink
information within that document -------------------
-------------------
itself. ----
• External link: A link to a different ---------------- Hyperlink ----------------
document outside of the document ----------------
----------------
----------------
being searched. ----------------
----------------
----------------
---------------- ----------------
• Executable link: An external link
that executes a program to process --------------- Hyperlink
data at the user's request on the ---------------
---------------
Program
Web, and produces resulting ---------------
information. --------------- Process/Data
-----
ĐẠI HỌC CẦN THƠ [Link]
CTU
42 42
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
CONTENT
1. Overview
2. Components of a Web-based System
3. HTTP Protocol
4. URL
5. HyperText & HyperLink
6. Web Cache
ĐẠI HỌC CẦN THƠ [Link]
CTU
43 43
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
6. WEB CACHE
Web cache: a mechanism for temporarily storing copies of
web resources (HTML pages, images, etc.) to provide to
clients without needing to access the original server.
Benefits:
Reduces client response time because it doesn't require accessing the
original server
Reduces the load on the web server
Reduces network traffic, saving bandwidth => limits network
bottlenecks.
Category:
Private cache (Browser cache), Public cache (Proxy cache).
ĐẠI HỌC CẦN THƠ [Link]
CTU
44 44
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
Web cache
All client HTTP requests are
sent to the web cache.
• If the request object is
already stored in the web
cache, the web cache will
immediately respond to the
client.
• Otherwise, the web cache
will access the origin server,
receive the response,
forward it to the client, and
also store a copy in the web
cache.
ĐẠI HỌC CẦN THƠ [Link]
CTU
45 45
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
Control Web caching
HTML
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
PHP
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
ĐẠI HỌC CẦN THƠ [Link]
CTU
46 46
Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
Questions?
ĐẠI HỌC CẦN THƠ [Link]
CTU
47 Cộng đồng – Toàn diện – Ưu việt
7 January 2026 Faculty of Computer Network and Communication
47