Uniform Resource Locator (URL)
URL (Uniform Resource Locator) is the address of a document on the Internet. URL is made up four parts–protocols, hostname, folder name and file name. Each part has its own specific functions. Depending on the applications, additional information can be added to the URL but the common and fundamental URL consists of these four parts. Refer Figure12.4
Figure 12.4 shows the basic URL where http is a protocol, www.cms.tn.gov.in is a hostname / domain name, sites/ default/files/press_ release are the folders and pr070119a.jpg is the file name. These are all the basic information which can be obtained from a URL.
Depending on the location of the document the URL is divided into 2 types
● Absolute URL
● Relative URL
Absolute URL is the complete address of a document on the Internet. Absolute URL contains all the information that are required to find the files on the Internet. These are similar to postal address if any of the information is missing then the post will not be delivered to the right person. Similarly, if any of the four parts is missing then the browser would not able to link to the specific file. So, all the four parts is very important in absolute URL.
Relative URL is the partial address of a document on the Internet. Relative URL contains only file name or file name with folder name. We can use this type of URL when the file is on the same server related to original document.