|
|
||||||||||
|
|
Navigation | URL Details |
|
|
|
||||||
|
URL Details
Since URL addresses are so important, let's look at their structure in a little more detail. We shall use as an example the address http://www.whitehouse.gov/WH/Welcome.html
URL addresses have 2 basic parts: (1) a portion specifying the method
of file access, and (2) a portion specifying the Internet location of the file
to be accessed.
The Method of File Access
The http transfer protocol is the most common one on the Web, but it is not the only one. For example, you will also commonly see URL's addressing servers using "File Transfer Protocol", or ftp: and file servers using "gopher" protocol: Now, if a browser can be used to get a file (almost) anywhere on the Internet, you might think that surely it can be used to access a file on the same computer as the browser? Indeed it can, and if you do that (by choosing "Open File in Browser" from under the "File" menu) the URL will have the typical form:file:///usr/people/guidry/webcourse/frame1.html The URL address beginning with "file:" is the signal that the address is not off somewhere else on the Internet, but is in fact on the same computer as the browser. Actually, the above would be the form of the URL for a file on a Macintosh or a Unix machine. For a file on a PC, you would see a URL of the form
file:///c:/usr/people/guidry/webcourse/frame1.html since a PC designates a disk drive, or other file storage device, with a letter and colon, rather than with a name. As a final example, you may often encounter the "mailto:" type URL address; for example:mailto:[email protected] In this case, "mailto:" indicates that this URL can be used to send an email message to the address specified after the colon. There are other transport protocols, but these examples illustrate some of the most important.
The Internet Location of the File
http://www.whitehouse.gov/WH/Welcome.html the file being accessed is called Welcome.html, and it resides in a directory (folder) called WH on a machine with IP address www.whitehouse.gov that is supplying the file with a server running the http protocol.
|
||||||||||
|
|
||||||||||