2. The World Wide Web
Introduction:
The World Wide Web, or Web, consists of a worldwide collection
of electronic documents (Web pages)
• A Web site is a collection of related Web pages and
associated items
•A Web server is a computer that delivers requested Web pages
to your computer
•Web 2.0 refers to Web sites that provide a means for users to
interact
3. The World Wide Web:
•A Web browser, or browser, allows users to access
Web pages and Web 2.0 programs
Internet Explorer
Firefox
Opera
Safari
Google Chrome
4. How the web works:
The client-server model
Client and server operate on machines which are able to communicate
through a network
The server waits for requests from a clients
Server receives a requests from a client
Performs a the requested work
Or lookup the requested data
And send a response to the client
Servers: file servers, web servers, name servers
Clients: browsers, email clients
5. The World Wide Web
•A home page is the first page that a Web site
displays
•Web pages provide links to other related Web
pages
–Surfing the Web
•Downloading is the process of receiving
information
6. The World Wide Web
•Two types of search tools are search engines and subject
directories
Search engine
Finds information related to a specific topic
Subject directory
Classifies Web pages in an organized set of categories
7.
8. url format
<scheme>://<server-domain-name>/<pathmane>
<scheme> which protocol to use
http: in general
file: which tells the client document is in a local machine
ftp: file transfer protocol
<server-domain-name> identifies the server system
i.e. www.doc.gold.ac.uk
<pathname> tells the server where to find the file
http://doc.gold.ac.uk/~username/index.html
9. Web browsers and servers
A browser: is a program that can retrieve files from the
world wide web and render text, images, or sounds
encoded in the files.
i.e. IE, Nescape, Mozilla
A web server: is an application which waits for client
requests, fetches requested documents from disk and
transmits them the client.
i.e Apache
10. What happened when you click on
hyperlink?
Determine URL and extract domaine name.
Use the name server to get IP address (DNS)
Make a TCP connect to port 80
And send a request for a web page once the server has
accepted to connection.
The server send the file and releases the TCP connection
The client displays the document.
11. Cookies
Request the browser to store a small data file (cookie) on
the users hard disk.
Which can serve to identify users only.
For instance it could contain a key into a database on the
server machine.
Most browsers nowadays allow you to decide whether or
not you want cookies on your machine.
12. What is an HTML File?
HTML stands for HyperText Markup Language
An HTML file is a text file containing small markup tags
The markup tags tell the Web browser how to display the page
An HTML file must have an htm or html file extension
An HTML file can be created using a simple text editor
13. A basic document
Every document should start with the following line
<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN”>
• There are three required elements, defined by the tags <html>,
<head> and <body>
<html>
<head>
<title>My Home Page</title>
</head>
<body>
<h1>Welcome</h1>
</body>
</html>