URL’s, OR ‘uniform resource locators’, are the web browser addresses of internet pages and files. It is the way to locate a file or document on the Internet. The URL specifies the address of a file and every file on the Internet has a unique address. It works with IP addresses to give a name, location to web pages. Web software, such as your browser, use the URL to retrieve a file from the computer on which it resides.
The format of a URL:
Every URL has three parts to address a page or file:
- Protocol which ends with a ‘//:’
- A host computer which ends with web extensions such as .com,.org etc.
- Filename or page name which displays the related information.
The above URL consists of:
- Protocol : http
- Host computer name : www
- Domain name : banks
- Domain type : com
- Path : /login
- File name : password.html
Elements of Absolute and relative URL:
An Absolute URL is independent or free from any relationship. It specifies the exact location of a file or directory on the internet. When you use an absolute URL, you target a particular file. Thus, each absolute URL is unique, which means that if two URLs are identical, they point to the same file. These URLs are always preferred as they help in web site maintenance. Moreover, it is easy to transfer a website from one domain name to another, you need not update each link on each page.
In above URL specifies an image file hardware.gif stored located in the images directory, under domain name www.services.com
If we want to include the image file hardware.gif stored in the images directory of www.services.com domain on this page.
Using an Absolute URL in a <img> tag is as follows:
<img src = http://www.services.com /images/hardware.gif width=“…”height=”…” />
A Relative URL is targeted to a file or directory in relation to the present file or directory. If the website has several sections and the files and web pages for each section have been segregated into different directories. This helps in keeping things organized and uncluttered on the website. The relative URLs and hence the file size of the web page would reduce if you use the former.
If we want to include the image file hardware. if stored in the images directory of www.services.com domain on this page using an absolute URL.
The < img > tag for this image display will be as follows:
Using a Relative URL in an <IMG> tag
<img src=”../images/hardware.gif” width=”…” height=”…”/>
Definition of the Protocols:
When we have to communicate with anyone, then we need to follow the same language, so that communication can be done in an effective manner. In the same way, whenever there is need to exchange data or information among the different or same type of networks on the internet, they need to follow the same set of rules.
The Internet is based on many layers of information, where each layer is dedicated to a different kind of documentation. These different layers are called protocols. A protocol is a set of rules that govern the communication between computers on a network. They exist at several levels in a telecommunication connection.
Types Of Protocols
- TCP/IP: TCP/IP (Transmission Control Protocol/Internet Protocol) is the basic point-to-point meaning each communication is from one point (or host computer) in the network to another point or host computer communication protocol on the Internet. It is used as a communication protocol in all types of networks. When you are connected to the Internet, your computer provides you a copy of the TCP/IP program when you need to send messages to or get information from the other computer.
TCP/IP is a two-layer protocol. The top layer, TCP(Transmission Control Protocol) manages the assembling of a message or file divided into smaller packets that are transmitted over the Internet and received by a TCP that reassembles the packets into the original message on the destination computer. The lower layer, Internet Protocol, handles the address part of each packet so that it gets to the right destination. Each gateway computer on the network checks for the address to forward the message. Some packets from the same message are routed differently than others, but they are reassembled at the destination.
- HTTP stands for HyperText Transfer Protocol, is a set of standards that allows users of the World Wide Web to exchange information found on web pages on the internet. HTTP defines how messages are formatted and transmitted, and what actions web server and browsers should take in response to various commands. Today’s modern browsers no longer require HTTP in front of the URL since it is the default method of communication. But, it is still used in browsers because of the need to access other protocols such as FTP through the browser. The HTTP provides a standard for Web browsers and servers to communicate.
- File Transfer Protocol (FTP) is a standard protocol used on a network to transfer the files from one host computer to another host computer using a TCP based network, such as the Internet.
FTP uses separate control and data connections between the client and the server. To use FTP server, users need to authenticate themselves using a sign-in protocol, using a username and password but can connect anonymously if the server is configured to allow it. For secured transmission the data encrypts (hides) the username and password, and even encrypt the content, using SSL.
To transfer files with FTP, use a program often called the client. An FTP client program initiates a connection to a remote computer running FTP server software. After the connection is established, the client can choose to send and/or receive files. To connect to an FTP server, a client requires a username and password as set on the server. Many FTP servers use a username as “anonymous”. Using FTP, you can also update (delete, rename, move, and copy) files to a server. You need to login to an FTP server. However, publicly available files are easily accessed using anonymous FTP.
FTP using TCP/IP works in the same way as HTTP used for transferring Web pages from a server to a user’s browser. FTP sites are heavily used and require several attempts before connecting.
To use your web browser to connect to an FTP site, where you normally enter a URL as follows: ftp://email@example.com name/