Web Essentials
Web Essentials
Client-Server model and have a look at how the Internet works via, web browsers. This
article will help us in having a solid foundation of the WEB and help in working with WEB
technologies with ease.
Client: When we talk the word Client, it mean to talk of a person or an organization using
a particular service. Similarly in the digital world a Client is a computer (Host) i.e. capable
of receiving information or using a particular service from the service providers ( Servers).
Servers: Similarly, when we talk the word Servers, It mean a person or medium that
serves something. Similarly in this digital world a Server is a remote computer which
provides information (data) or access to particular services.
So, its basically the Client requesting something and the Server serving it as long as its
present in the database.
How the browser interacts with the servers ? There are few steps to follow to interacts with
the servers a client.
User enters the URL(Uniform Resource Locator) of the website or file. The Browser then
requests the DNS(DOMAIN NAME SYSTEM) Server.
DNS Server lookup for the address of the WEB Server.
DNS Server responds with the IP address of the WEB Server.
Browser sends over an HTTP/HTTPS request to WEB Server’s IP (provided by DNS
server).
Server sends over the necessary files of the website.
Browser then renders the files and the website is displayed. This rendering is done with the
help of DOM (Document Object Model) interpreter, CSS interpreter and JS
Engine collectively known as the JIT or (Just in Time) Compilers.
Advantages of Client-Server model:
Centralized system with all data in a single place.
Cost efficient requires less maintenance cost and Data recovery is possible.
The capacity of the Client and Servers can be changed separately.
Disadvantages of Client-Server model:
Clients are prone to viruses, Trojans and worms if present in the Server or uploaded into
the Server.
Server are prone to Denial of Service (DOS) attacks.
Data packets may be spoofed or modified during transmission.
Phishing or capturing login credentials or other useful information of the user are common
and MITM(Man in the Middle) attacks are common.
Feeling lost in the vast world of System Design? It's time for a transformation! Enroll in
our Mastering System Design From Low-Level to High-Level Solutions - Live Course and
embark on an exhilarating journey to efficiently master system design concepts and
techniques.
The Internet is a worldwide telecommunications system that provides connectivity for millions of
other, smaller networks; therefore, the Internet is often referred to as a network of networks. It
allows computer users to communicate with each other across distance and computer
platforms.
The Internet began in 1969 as the U.S. Department of Defense's Advanced Research Project
Agency (ARPA) to provide immediate communication within the Department in case of war.
Computers were then installed at U.S. universities with defense related projects. As scholars
began to go online, this network changed from military use to scientific use. As ARPAnet grew,
administration of the system became distributed to a number of organizations, including the
National Science Foundation (NSF). This shift of responsibility began the transformation of the
science oriented ARPAnet into the commercially minded and funded Internet used by millions
today.
The Internet acts as a pipeline to transport electronic messages from one network to another
network.
At the heart of most networks is a server, a fast computer with large amounts of memory and
storage space. The server controls the communication of information between the devices
attached to a network, such as computers, printers, or other servers.
An Internet Service Provider (ISP) allows the user access to the Internet through their server.
Many teachers use a connection through a local university as their ISP because it is free. Other
ISPs, such as America Online, telephone companies, or cable companies provide Internet
access for their members.
You can connect to the Internet through telephone lines, cable modems, cellphones and other
mobile devices.
The World Wide Web contains a vast collection of linked multimedia pages that is ever-
changing. However, there are several basic components of the Web that allow users to
communicate with each other. Below you will find selected components and their descriptions.
TCP/IP protocols
In order for a computer to communicate on the Internet, a set of rules or protocols computers
must follow to exchange messages was developed. The two most important protocols allowing
computers to transmit data on the Internet are Transmission Control Protocol (TCP) and Internet
Protocol (IP). With these protocols, virtually all computers can communicate with each other.
For instance, if a user is running Windows on a PC, he or she can communicate with iPhones.
URLs
Addresses for web sites are called URLs (Uniform Resource Locators). Most of them begin with
http (HyperText Transfer Protocol), followed by a colon and two slashes. For example, the URL
for the Florida Center for Instructional Technology is https://fcit.usf.edu/ .
Some of the URL addresses include a directory path and a file name. Consequently, the
addresses can become quite long. For example, the URL of a web page may be:
https://fcit.usf.edu/holocaust/default.htm. In this example, "default.htm" is the name of the file
which is in a directory named "holocaust" on the FCIT server at the University of South Florida.
Top-level domain
Each part of a domain name contains certain information. The first field is the host name,
identifying a single computer or organization. The last field is the top-level domain, describing
the type of organization and occasionally country of origin associated with the address.
Top-level domain names include:
.com Commercial
.edu Educational
.gov US Government
.int Organization
.mil US Military
.net Networking Providers
.org Non-profit Organization
Domain name country codes include, but are not limited to:
.au Australia
.de Germany
.fr France
.nl Netherlands
.uk United Kingdom
.us United States
Paying attention to the top level domain may give you a clue as to the accuracy of the
information you find. For example, information on a "com" site can prove useful, but one should
always be aware that the intent of the site may be to sell a particular product or service.
Likewise, the quality of information you find on the "edu" domain may vary. Although many
pages in that domain were created by the educational institutions themselves, some "edu"
pages may be the private opinions of faculty and students. A common convention at many
institutions is to indicate a faculty or student page with a ~ (tilde) in the address. For instance,
https://fcit.usf.edu/~kemker/default.htm is a student's personal web page.
Web browser:
Menu bar
The menu bar, located at the very top of the screen, can be accessed using the mouse. When
you hold down the mouse button over an item in the main menu, a sub menu is "pulled down"
that has a variety of options. Actions that are in black can be performed, while actions that
cannot be performed will be in gray or lightened. The submenus provide keyboard shortcuts for
many common actions, allowing you to implement the functions faster than using the mouse.
Tool bar
The tool bar is located at the top of the browser; it contains navigational buttons for the Web.
Basic functions of these buttons include:
Command Function
Home Opens or returns to starting page
Back Takes you to the previous page
Forward Takes you to the next page
Print Prints current page
Stop Stops loading a page
Reload Refresh/redisplays current page
Search Accesses search engine
Location bar
The location bar, below the tool bar, is a box labeled "Location," "GoTo," or "Address." You can
type in a site's address, and press the Return or Enter key to open the site.
Status bar
The status bar is located at the very bottom of the browser window. You can watch the progress
of a web page download to determine if the host computer has been contacted and text and
images are being downloaded.
Scroll bar
The scroll bar is the vertical bar located on the right of the browser window. You can scroll up
and down a web page by placing the cursor on the slider control and holding down the mouse
button.
The Internet Protocol (IP) is a protocol, or set of rules, for routing and addressing packets of
data so that they can travel across networks and arrive at the correct destination. Data
traversing the Internet is divided into smaller pieces, called packets. IP information is
attached to each packet, and this information helps routers to send packets to the right
place. Every device or domain that connects to the Internet is assigned an IP address, and
as packets are directed to the IP address attached to them, data arrives where it is needed.
Once the packets arrive at their destination, they are handled differently depending on
which transport protocol is used in combination with IP. The most common transport
protocols are TCP and UDP.
In networking, a protocol is a standardized way of doing certain actions and formatting data
so that two or more devices are able to communicate with and understand each other.
To understand why protocols are necessary, consider the process of mailing a letter. On the
envelope, addresses are written in the following order: name, street address, city, state, and
zip code. If an envelope is dropped into a mailbox with the zip code written first, followed by
the street address, followed by the state, and so on, the post office won't deliver it. There is
an agreed-upon protocol for writing addresses in order for the postal system to work. In the
same way, all IP data packets must present certain information in a certain order, and all IP
addresses follow a standardized format.
What is an IP address? How does IP addressing work?
The fourth version of IP (IPv4 for short) was introduced in 1983. However, just as there are
only so many possible permutations for automobile license plate numbers and they have to
be reformatted periodically, the supply of available IPv4 addresses has become depleted.
IPv6 addresses have many more characters and thus more permutations; however, IPv6 is
not yet completely adopted, and most domains and devices still have IPv4 addresses. For
more on IPv4 and IPv6, see What is my IP address?
What is an IP packet?
IP packets are created by adding an IP header to each packet of data before it is sent on its way.
An IP header is just a series of bits (ones and zeros), and it records several pieces of information
about the packet, including the sending and receiving IP address. IP headers also report:
Header length
Packet length
Time to live (TTL), or the number of network hops a packet can make before it is
discarded
Which transport protocol is being used (TCP, UDP, etc.)
In total there are 14 fields for information in IPv4 headers, although one of them is optional.
What is TCP/IP?
The Transmission Control Protocol (TCP) is a transport protocol, meaning it dictates the way data
is sent and received. A TCP header is included in the data portion of each packet that
uses TCP/IP. Before transmitting data, TCP opens a connection with the recipient. TCP ensures
that all packets arrive in order once transmission begins. Via TCP, the recipient will acknowledge
receiving each packet that arrives. Missing packets will be sent again if receipt is not
acknowledged.
TCP is designed for reliability, not speed. Because TCP has to make sure all packets arrive in
order, loading data via TCP/IP can take longer if some packets are missing.
TCP and IP were originally designed to be used together, and these are often referred to as the
TCP/IP suite. However, other transport protocols can be used with IP.
What is UDP/IP?
The User Datagram Protocol, or UDP, is another widely used transport protocol. It is faster than
TCP, but it is also less reliable. UDP does not make sure all packets are delivered and in order,
and it does not establish a connection before beginning or receiving transmissions.
The World Wide Online (WWW), often known as the Web, is an information system in which Uniform
Resource Locators (URLs) are used to identify documents and other digital resources. URLs, such as
https://example.com/, which can be connected together via hyperlinks and are accessible over the
Internet.
Hypertext Transport Protocol (HTTP) is used to transport Web resources, which are accessed by users
via a web browser and published by a web server. The World Wide Web is not the same as the
Internet, which is built on the same technology as the Web and predates it by more than two decades
in certain forms.
A Brief History of WWW
The World Wide Web was founded in 1989 by Tim Berners-Lee, an English scientist. He invented the
first web browser in 1990 while working at CERN in Geneva, Switzerland. The browser was first made
accessible to other research organizations outside of CERN in January 1991, and then to the general
public in August 1991. In the years 1993–2004, when websites for general use were available, the Web
began to become more widely used. The World Wide Web is the tool that billions of people use to
interact on the Internet, and it has played a key role in the development of the Information Age.
WWW vs Internet
The phrases "Internet" and the "World Wide Web" are often used interchangeably, but they do not
have the same meaning. The Internet is a vast network of interconnected computer networks that
span the globe. In comparison, the World Wide Web is a worldwide collection of papers and other
resources connected together via hyperlinks and URIs. HTTP or HTTPS is an application-level Internet
protocol that employs the Internet's transport protocols to access web resources.
Web browsers, Hypertext Markup Language (HTML), and Hypertext Transfer Protocol (HTTP) are
among the technologies that make up the World Wide Web.
Normally, viewing a webpage on the World Wide Web begins with either inputting the page's URL into
a web browser or clicking on a hyperlink to that page or resource. To fetch and display the requested
page, the web browser sends a series of background communication messages.
Using a browser to read online pages—and to go from one web page to another via hyperlinks—
became known as 'browsing,' 'web surfing,' or 'navigating the Web' in the 1990s. Early research on this
new behavior focused on user behaviors when using web browsers. Exploratory surfing, window
surfing, evolved surfing, constrained navigation, and focused navigation, for example, were discovered
in one research.
Website Components
Uniform Resource Locator (URL) − serves as a system for resources on the Web.
HyperText Transfer Protocol (HTTP) − specifies communication of browser and server.
HyperText Markup Language (HTML) − defines structure, organization, and content of the
webpage.
What is HTTP?
It stands for hypertext transfer protocol. Using this protocol the client sends a request to the
server and based on the request the server and the web browser respond to the client.
In a nutshell, we can say that it’s the base using which one computer (the client) communicates
with another (the server).
Once the connection is established using the Http protocol between client and server, the client
then sends a request in the form of binary data to the server asking to access specific files or
information from the server.
Every HTTP request contains three elements which are:- Request Line, Request Header, Body
of Request(optional).
Request line:-
1. It specifies the method, which tells the server what to do with the information or
resource.
2. It contains the URL of the request which is used to find the resource on the server.
3. It also specifies HTTP protocol version being used (Ex. HTTP/ 1.0 or HTTP/1.1)
HTTP Response
The response from the server with the target to provide the client with the desired resources is
HTTP Response.
Uniform Resource Locators (URL) The URI (Uniform Resource Identifier) is a string that
associates a particular resource on the web. There are two types of URI: URN (Uniform
Resource Name) This identifies the resource using unique names. They do not signify the
location of the resource. It consists of three parts:Scheme name, Namespace identifier and
Namespace string Syntax:Urn: name: resource name Example: URN: ISBN: 5427877