Today's lesson explores URLs (Uniform Resource Locators), which
allow you to locate documents and other resources on the World Wide Web.
When you look in the "Address" line of your browser,
you're seeing a URL!
To specify URLs, you use the pathname conventions discussed on Day 17,
but there are some other things you should know...
INDEX CARD #18:
UNIFORM RESOURCE LOCATORs (18a)
What is a URL? "URL" stands for "Uniform Resource Locator." (It
"locates resources" for you on the web.) Here's an example that illustrates the usual parts of a URL:
a protocol identifier (the "http://" part)
The most common protocol identifier is "http://", which points to a hypertext document accessible through the HyperText Transfer Protocol.
Another common protocol identifier is "ftp://" (for a file accessible through the File Transfer Protocol).
the domain name (also called "host name")
The domain name is the name of the server machine for the desired resource. The domain name in the example above is "www.keypress.com" .
the pathname to the desired location in the server's file system
The pathname in the example above is "sketchpad/sketchdemo.html" .
the "MAILTO" URL and more... (18b)
What is a "mailto" URL? The mailto protocol
can be used in an anchor tag to automatically send an email message
from within the browser. For example, the code
<A HREF="mailto:firstname.lastname@example.org"> Send me an email! </A>
would produce this: (Try it out! Tell me how the course is going for you...)
(The browser must be configured to support this tag, so it might not always work.)
What happens if there's a forward slash at the end of a URL? A forward slash (/) at the end of a URL means that you're pointing to a directory, not a file; i.e., you're asking to see the contents of the
directory. This is a breach of privacy, so most servers are configured to
to display a specific file (like "index.html" or "welcome.html" or "default.html") instead of the directory list. If the server doesn't
find such a file, the directory contents may be displayed.
Please read the definitions for these terms: URL, domain name. Feel free to follow the links and read about some of the related terms, if you're interested!
(A18.1) Re-read pages 133 ("Absolute URLs" and "Relative URLs") and 49 ("Index Files") in the Weasel Book.
(A18.2) Read pages 143144 (from "Non-Web Links and Protocols" up to
"FTP Link (ftp://") in the Weasel Book.
(A18.3) Put a "mailto:" link on your homepage, so that users can contact you.
(You can remove this link before making your webpage available to the world,
if you choose NOT to be reachable via email.)
(A18.4) Ask your local computer guru if your server is configured to display
a particular file if a URL ends with a forward slash. Find out the name
of this file! You may want to re-name your main page appropriately. Or,
create a file with the specified name.