Uniform Resource Locator
Ø A client that wants to access a Web page, he needs the address.
Ø To facilitate the access of documents
distributed throughout the world, HTTP uses locators.
Ø Every document on the Web has
a unique address. This address is known as Uniform Resource Locator
(URL)
Ø The uniform resource locator (URL) is a
standard for specifying
any kind of information on the Internet.
Ø The URL defines four things: protocol/Service, host computer, port, and path.
|
Sr. No
|
Scheme & Description
|
|
1
|
http://
Hypertext Transfer Protocol (HTTP) is used
to request pages from Web servers and send them back from Web servers to
browsers.
|
|
2
|
https://
Secure Hypertext Transfer Protocol (HTTPS) encrypts
the data sent between the browser and the Web server using a digital
certificate.
|
|
3
|
ftp://
File Transfer Protocol is another method for transferring
files on the Web. While HTTP is a lot more popular for
viewing Web sites because of its integration with browsers, FTP is still
commonly used protocol to transfer large files across the Web and to upload
source files to your Web server.
|
|
4
|
file://
Used to indicate that a file
is on the local hard disk or a shared directory on a LAN.
|
Ø The protocol is the client/server program used to
retrieve the document.
Ø For example, most web browsers
use Hypertext Transfer Protocol (HTTP) to pass information to communicate with the web servers and this is the reason a URL
starts with http://.
Ø There are other schemes
available and you can use either of them based on your requirement:
Ø The host is the computer on which the
information is located, although the name of the computer can be an XYZ. Web pages are
usually stored in computers, and computers are given XYZ names that usually
begin with the characters "www". This is not mandatory, however, as
the host can be
any name given to the computer that hosts the Web page.
Ø The host address is where a website can be found, either the IP address or more
commonly the domain name for a site such as www.google.com.
Ø The URL can optionally contain the port
number of the server.
If the port is included, it is inserted between the host and the path, and it is separated from the host by a
colon.
Ø Path is the
pathname of the file where the information is located.
Ø The file path always begins with a forward slash character, and may consist of one
or more directory or folder names. Each directory name is separated by forward slash
characters and the file path may end with a filename at the end. Here index.htm is the filename which is available in html directory:
https://www.onlinesmarttrainer.blogspot.com/html/index.html
URL Types
Ø There are two forms of URL as
listed below:
·
Absolute URL
·
Relative URL
ABSOLUTE URL
Ø Absolute
URL is a complete address of a resource on the web.
This completed address comprises of protocol
used, server name, path name and file name.
RELATIVE URL
Ø Relative
URL is a partial address of a web page.
Unlike absolute URL, the protocol
and server
part
are omitted from relative URL.
Ø
Relative URLs are used
for internal links i.e. to create links to file that are part
of same website as the Web Pages on which you are
placing the link.
Ø For
example, to link an image on onlinesmarttrainer.com/internet_technology/internet_reference_models,
we can use the relative URL which can take the form like
/internet_technologies/internet-osi_model.jpg.
