Uniform Resource Locator

From Hill2dot0
Revision as of 08:46, 21 June 2007 by Arabidoux (talk | contribs)
Jump to: navigation, search

A Uniform Resource Locator, also sometimes known as a Universal Resource Locator, is a form of addressing found on the Internet. It refers to the type of addressing used to specify specific desired resources and is most commonly found on the World Wide Web (WWW). A type of Uniform Resource Identifier (URI), the URL has a few basic components which include:

  • Protocol (optional) - identifies the protocol to be used in retrieving the resource. If this is not specified, most browsers default to using the HyperText Transfer Protocol (HTTP).
  • Username:Password@ (optional) - provides authentication information if the resource in question requires it.
  • Host - The DNS name for the system hosting the resource.
  • Port (optional) - The TCP or UDP port number where the service is listening for requests. If this is not specified most browsers default to Port 80, which is the default port for an HTTP service.
  • Path (optional) - The full path (directory within directory) to the specific resource to be retrieved. This path can terminate with a specific file or resource name. If none is specified, the server will send the default page for that directory as specified by the administrator of the server. If no path is provided at all, the server will send the default page for the root of the directory system, which is also known as the home page.
  • Query (optional) - These are essentially one or more arguments of the form variable=value. If there are several they are separated by an ampersand (&). Using these, the server can pass values into pages and drive decisions or structures. For example, a page may contain code indicating that the server is to combine the base page with a file called variable. If the URL contains the query variable=cd0021.txt" then the server will combine the base page with the file cd0021.txt. This structure is the basis for Web Services.
  • Anchor/Fragment (optional) - An HTML page may contain anchor points within it specified by the page creator. The anchor is simply a pointer to that location of the page. This structure is commonly used to put a short list of sections at the top of a long page, and make it possible for the reader to jump down to a particular section of the page.

So a complete URL for a weather radar of Huntington Vermont from the Weather Underground would look like this:

http://www.wunderground.com/radar/radblast.asp?num=6&scale=0.5&delay=50&noclutter=0&showstorms=0&showlabels=1&ID=CXX&lat=44.31071854&lon=-73.00350189&label=Huntington%2C+VT&type=N0R&zoommode=pan&map.x=400&map.y=240&centerx=400&centery=240&prevzoom=pan

Where the fields have the following meaning:

  • http:// - Use HTTP to retrieve the resource. Note the absence of a username or password to access this resource.
  • www.wunderground.com - The host offering this service. Note the absence of a port specification, so Port 80 is used.
  • /radar/radblast.asp - Send the file called radblast.asp in the radar directory off the root directory.
  • ?num=6&scale=0.5&delay=50&noclutter=0&showstorms=0&showlabels=1&ID=CXX&lat=44.31071854&lon=-73.00350189&label=Huntington%2C+VT&type=N0R&zoommode=pan&map.x=400&map.y=240&centerx=400&centery=240&prevzoom=pan - A long string of queries that specify exactly how the page is to function. For example, num=6 sets the number of frames in the radar loop to six. scale=5 sets the scale of the map to half the normal scale. delay=50 sets the time between displaying each frame of the radar loop to 50 (a value that has apparently some time associated with it, and is probably two as fast as 100 and half as slow as 25). Note the absence of an anchor fragment.

PodSnacks

<mp3>http://podcast.hill-vt.com/podsnacks/url.mp3%7Cdownload</mp3> | Uniform Resource Locator (URL)