Professional Documents
Culture Documents
Unit 1
Unit 1
The Internet is essentially a global network of computing resources. You can think of
the Internet as a physical collection of routers and circuits as a set of shared
resources.
Some common definitions given in the past include −
Internet-Based Services
Some of the basic services available to Internet users are −
• Email − A fast, easy, and inexpensive way to communicate with other Internet
users around the world.
• Telnet − Allows a user to log into a remote computer as though it were a local
system.
• FTP − Allows a user to transfer virtually every kind of file that can be stored on
a computer from one Internet-connected computer to another.
• UseNet news − A distributed bulletin board that offers a combination news and
discussion service on thousands of topics.
• World Wide Web (WWW) − A hypertext interface to Internet information
resources.
What is WWW?
WWW stands for World Wide Web. A technical definition of the World Wide Web is −
All the resources and users on the Internet that are using the Hypertext Transfer
Protocol (HTTP).
A broader definition comes from the organization that Web inventor Tim Berners-Lee
helped found, the World Wide Web Consortium (W3C): The World Wide Web is the
universe of network-accessible information, an embodiment of human
knowledge.
In simple terms, The World Wide Web is a way of exchanging information
between computers on the Internet, tying them together into a vast collection
of interactive multimedia resources.
What is HTTP?
HTTP stands for Hypertext Transfer Protocol. This is the protocol being used
to transfer hypertext documents that makes the World Wide Web possible.
A standard web address such as Yahoo.com is called a URL and here the
prefix http indicates its protocol
What is URL?
URL stands for Uniform Resource Locator, and is used to specify addresses
on the World Wide Web. A URL is the fundamental network identification for any
resource connected to the web (e.g., hypertext pages, images, and sound files).
A URL will have the following format −
protocol://hostname/other_information
The protocol specifies how information is transferred from a link. The protocol used
for web resources is HyperText Transfer Protocol (HTTP). Other protocols compatible
with most web browsers include FTP, telnet, newsgroups, and Gopher.
The protocol is followed by a colon, two slashes, and then the domain name. The
domain name is the computer on which the resource is located.
Links to particular files or subdirectories may be further specified after the domain
name. The directory names are separated by single forward slashes.
What is Website?
A website is a collection of various pages written in HTML markup language. This is
a location on the web where people can find tutorials on latest technologies. Similarly,
there are millions of websites available on the web.
Each page available on the website is called a web page and first page of any website
is called home page for that site.
What is ISP?
ISP stands for Internet Service Provider. They are the companies who provide you
service in terms of internet connection to connect to the internet.
You will buy space on a Web Server from any Internet Service Provider. This space
will be used to host your Website.
What is HTML?
HTML stands for Hyper Text Markup Language. This is the language in which we
write web pages for any Website. Even the page you are reading right now is written
in HTML.
This is a subset of Standard Generalized Mark-Up Language (SGML) for electronic
publishing, the specific standard used for the World Wide Web.
What is Hyperlink?
A hyperlink or simply a link is a selectable element in an electronic document
that serves as an access point to other electronic resources. Typically, you click
the hyperlink to access the linked resource. Familiar hyperlinks include buttons, icons,
image maps, and clickable text links.
What is DNS?
DNS stands for Domain Name System. When someone types in your domain name,
www.example.com, your browser will ask the Domain Name System to find the IP
that hosts your site. When you register your domain name, your IP address should
be put in a DNS along with your domain name. Without doing it your domain name
will not be functioning properly.
What is W3C?
W3C stands for World Wide Web Consortium which is an international consortium of
companies involved with the Internet and the Web.
The W3C was founded in 1994 by Tim Berners-Lee, the original architect of the World
Wide Web. The organization's purpose is to develop open standards so that the Web
evolves in a single direction rather than being splintered among competing factions.
The W3C is the chief standards body for HTTP and HTML.
HTTP headers
The HTTP headers are used to pass additional information between the
clients and the server through the request and response header. All the
headers are case-insensitive, headers fields are separated by colon, key-
value pairs in clear-text string format. The end of the header section denoted
by an empty field header. There are a few header fields that can contain the
comments. And a few headers can contain quality(q) key-value pairs that
separated by an equal sign.
HTTP Headers
HTTP header fields provide required information about the request or response, or
about the object sent in the message body. There are four types of HTTP message
headers:
• Client Request-header: These header fields have applicability only for
request messages.
• Server Response-header: These header fields have applicability only for
response messages.
1 Comment=comment
This option can be used to specify any comment associated with the cookie.
2 Domain=domain
The Domain attribute specifies the domain for which the cookie is valid.
3 Expires=Date-time
The date the cookie will expire. If it is blank, the cookie will expire when the visitor
quits the browser.
4 Path=path
The Path attribute specifies the subset of URLs to which this cookie applies.
5 Secure
It instructs the user agent to return the cookie only under a secure connection.
HTTP Methods
The set of common methods for HTTP/1.1 is defined below and this set can be
expanded based on requirements. These method names are case sensitive and they
must be used in uppercase.
1 GET
The GET method is used to retrieve information from the given server using a given
URI. Requests using GET should only retrieve data and should have no other effect
on the data.
2 HEAD
Same as GET, but transfers the status line and header section only.
3 POST
A POST request is used to send data to the server, for example, customer
information, file upload, etc. using HTML forms.
4 PUT
Replaces all current representations of the target resource with the uploaded content.
5 DELETE
Removes all current representations of the target resource given by a URI.
6 CONNECT
Establishes a tunnel to the server identified by a given URI.
7 OPTIONS
Describes the communication options for the target resource.
8 TRACE
Performs a message loop-back test along the path to the target resource.
GET Method
A GET request retrieves data from a web server by specifying parameters in the URL
portion of the request. This is the main method used for document retrieval. The
following example makes use of GET method to fetch hello.htm:
GET /hello.htm HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE5.01; Windows NT)
Host: www.tutorialspoint.com
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: Keep-Alive
The server response against the above HEAD request will be as follows:
HTTP/1.1 200 OK
Date: Mon, 27 Jul 2009 12:28:53 GMT
Server: Apache/2.2.14 (Win32)
Last-Modified: Wed, 22 Jul 2009 19:15:56 GMT
ETag: "34aa387-d-1568eb00"
Vary: Authorization,Accept
Accept-Ranges: bytes
Content-Length: 88
Content-Type: text/html
Connection: Closed
<html>
<body>
<h1>Hello, World!</h1>
</body>
</html>
HEAD Method
The HEAD method is functionally similar to GET, except that the server replies with
a response line and headers, but no entity-body. The following example makes use
of HEAD method to fetch header information about hello.htm:
HEAD /hello.htm HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE5.01; Windows NT)
Host: www.tutorialspoint.com
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: Keep-Alive
The server response against the above HEAD request will be as follows:
HTTP/1.1 200 OK
Date: Mon, 27 Jul 2009 12:28:53 GMT
Server: Apache/2.2.14 (Win32)
Last-Modified: Wed, 22 Jul 2009 19:15:56 GMT
ETag: "34aa387-d-1568eb00"
Vary: Authorization,Accept
Accept-Ranges: bytes
Content-Length: 88
Content-Type: text/html
Connection: Closed
You can notice that here server the does not send any data after header.
POST Method
The POST method is used when you want to send some data to the server, for
example, file update, form data, etc. The following example makes use of POST
method to send a form data to the server, which will be processed by a process.cgi
and finally a response will be returned:
POST /cgi-bin/process.cgi HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE5.01; Windows NT)
Host: www.tutorialspoint.com
Content-Type: text/xml; charset=utf-8
Content-Length: 88
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: Keep-Alive
<?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://clearforest.com/">string</string>
The server side script process.cgi processes the passed data and sends the following
response:
HTTP/1.1 200 OK
Date: Mon, 27 Jul 2009 12:28:53 GMT
Server: Apache/2.2.14 (Win32)
Last-Modified: Wed, 22 Jul 2009 19:15:56 GMT
ETag: "34aa387-d-1568eb00"
Vary: Authorization,Accept
Accept-Ranges: bytes
Content-Length: 88
Content-Type: text/html
Connection: Closed
<html>
<body>
<h1>Request Processed Successfully</h1>
</body>
</html>
PUT Method
The PUT method is used to request the server to store the included entity-body at a
location specified by the given URL. The following example requests the server to
save the given entity-body in hello.htm at the root of the server:
PUT /hello.htm HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE5.01; Windows NT)
Host: www.tutorialspoint.com
Accept-Language: en-us
Connection: Keep-Alive
Content-type: text/html
Content-Length: 182
<html>
<body>
<h1>Hello, World!</h1>
</body>
</html>
The server will store the given entity-body in hello.htm file and will send the following
response back to the client:
HTTP/1.1 201 Created
Date: Mon, 27 Jul 2009 12:28:53 GMT
Server: Apache/2.2.14 (Win32)
Content-type: text/html
Content-length: 30
Connection: Closed
<html>
<body>
<h1>The file was created.</h1>
</body>
</html>
DELETE Method
The DELETE method is used to request the server to delete a file at a location
specified by the given URL. The following example requests the server to delete the
given file hello.htm at the root of the server:
DELETE /hello.htm HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE5.01; Windows NT)
Host: www.tutorialspoint.com
Accept-Language: en-us
Connection: Keep-Alive
The server will delete the mentioned file hello.htm and will send the following
response back to the client:
HTTP/1.1 200 OK
Date: Mon, 27 Jul 2009 12:28:53 GMT
Server: Apache/2.2.14 (Win32)
Content-type: text/html
Content-length: 30
Connection: Closed
<html>
<body>
<h1>URL deleted.</h1>
</body>
</html>
CONNECT Method
The CONNECT method is used by the client to establish a network connection to a
web server over HTTP. The following example requests a connection with a web
server running on the host tutorialspoint.com:
CONNECT www.tutorialspoint.com HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE5.01; Windows NT)
The connection is established with the server and the following response is sent back
to the client:
HTTP/1.1 200 Connection established
Date: Mon, 27 Jul 2009 12:28:53 GMT
Server: Apache/2.2.14 (Win32)
OPTIONS Method
The OPTIONS method is used by the client to find out the HTTP methods and other
options supported by a web server. The client can specify a URL for the OPTIONS
method, or an asterisk (*) to refer to the entire server. The following example requests
a list of methods supported by a web server running on tutorialspoint.com:
OPTIONS * HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE5.01; Windows NT)
The server will send an information based on the current configuration of the server,
for example:
HTTP/1.1 200 OK
Date: Mon, 27 Jul 2009 12:28:53 GMT
Server: Apache/2.2.14 (Win32)
Allow: GET,HEAD,POST,OPTIONS,TRACE
Content-Type: httpd/unix-directory
TRACE Method
The TRACE method is used to echo the contents of an HTTP Request back to the
requester which can be used for debugging purpose at the time of development. The
following example shows the usage of TRACE method:
TRACE / HTTP/1.1
Host: www.tutorialspoint.com
User-Agent: Mozilla/4.0 (compatible; MSIE5.01; Windows NT)
The server will send the following message in response to the above request:
HTTP/1.1 200 OK
Date: Mon, 27 Jul 2009 12:28:53 GMT
Server: Apache/2.2.14 (Win32)
Connection: close
Content-Type: message/http
Content-Length: 39
TRACE / HTTP/1.1
Host: www.tutorialspoint.com
User-Agent: Mozilla/4.0 (compatible; MSIE5.01; Windows NT)
Architecture of a Web browser
The primary components of a browser are shown in the below image:
1. User Interface: The user interface is an area where the user can use several options
like address bar, back and forward button, menu, bookmarking, and many other
options to interact with the browser.
2. Browser Engine: It connects the UI (User Interface) and the rendering engine as a
bridge. It queries and manipulates the rendering engine based on inputs from several
user interfaces.
3. Rendering Engine: It is responsible for displaying the requested content on the
browser screen. It translates the HTML, XML files, and images, which are formatted by
using the CSS. It generates the layout of the content and displays it on the browser
screen. Although it can also display the other types of content by using different types
of plugins or extensions. such as:
o Internet Explorer uses Trident
o Chrome & Opera 15+ use Blink
o Chrome (iPhone) & Safari use Webkit
o Firefox & other Mozilla browsers use Gecko
4. Networking: It retrieves the URLs by using internet protocols like HTTP or FTP. It is
responsible for maintaining all aspects of Internet communication and security.
Furthermore, it may be used to cache a retrieved document to reduce network traffic.
5. JavaScript Interpreter: As the name suggests, JavaScript Interpreter translates and
executes the JavaScript code, which is included in a website. The translated results are
sent to the rendering engine to display results on the device screen.
6. UI Backend: It is used to draw basic combo boxes and Windows (widgets). It specifies
a generic interface, which is not platform-specific.
7. Data Storage: The data storage is a persistence layer that is used by the browser to
store all sorts of information locally, like cookies. A browser also supports different
storage mechanisms such as IndexedDB, WebSQL, localStorage, and FileSystem. It is a
database stored on the local drive of your computer where the browser is installed. It
handles user data like cache, bookmarks, cookies, and preferences.
Understanding SEO
Search Engine Optimization (SEO) is the activity of optimizing web pages or whole
sites in order to make them search engine friendly, thus getting higher positions in
search results. SEO techniques will be used to improve the visibility of your web
pages for different search engines, especially for Google, Yahoo, and Bing.