Fully Specify URLs in HTML Code - Page 30
June 15, 2001
I do recommended using fully syntactically correct URLs in the
hypertext links in actual HTML code. In particular, it is best to
include the trailing slash for any URL that points to the default
file in a directory. Most web servers can cope with a missing
slash, but doing so typically requires the server to redirect the
browser's request from the abbreviated version to the correct
version, and doing so takes time and adds to the response time
delay. Thus, if you want to refer to my Alertbox column in print,
you would write the URL as http://www.useit.com/alertbox or even
www.useit.com/alertbox
If you wanted to include a hypertext link to the column in one of
your web pages, the HTML should be coded as
<a href="http://www.useit.com/alertbox/">
URL Guessing
At a recent Digital Kids conference, a fifth grader was asked how
he found things on the Internet. His answer was, "I sort of
experiment. I take things I like and put '.com' after them." Most
adults do the same. In fact, it is quite striking in user testing
how often people revert to URL guessing.
Archival URLs
Links from other websites are the third most-common way people
find sites (after search engines and email recommendations), so
build your site to make it easy to attract inbound links.
Linkrot equals lost business, so make sure all URLs live forever
and continue to point to relevant pages. Do not move pages
around; instead, keep them at the same URL. It is very annoying
for authors of other sites when their links either stop working
or turn into pointers to something different because the original
page has been moved and replaced by something new.
|
Beware of the Os and 0s
|
It is dangerous to use the digit 0 (zero) and the
letter O (uppercase o) in URLs because users often confuse the
two. The lowercase letter o is less of a problem. If you do need
to use a 0 or an O in a URL, then you should establish an alias
for the same URL with the erroneous character that points to the
correct one. In particular, if reserving a domain name like
box0.com, you should also buy boxO.com and have it forward hits
to box0.com.
|
Content that changes on a regular basis is often stored under
temporary URLs. Examples include the current issue of a magazine,
today's front page for a newspaper, and the program for the
upcoming version of an annual conference. You will often want to
publicize virtual URLs that point to the concept of "CyberTimes
front page," "this week's editorial," "list of keynotes at the
next InternetWorld conference," and so on. In fact, users often
prefer to bookmark such virtual pointers because they are
interested in accessing the most current information whenever
they visit.
Often, such topical content may be of long-term interest and
should be archived under permanent URLs in addition to the
temporary URL, which will be changed to point to new content on a
regular basis. For example, I often want to link the readers of
my online column to articles in online magazines, but of course I
don't want to link to "the current week's editorial" but to "the
editorial on overuse of animation." These two concepts may
temporarily have the same URL, but it is much easier for me if I
can use the permanent URL of the archived version as the link for
my own HTML file. It would be a pain to have to update the link
at a later date, and many authors forget to do so. Even worse,
link-checkers will often not discover the mistake because the old
URL continues to be valid. Rather, it simply points to new and
irrelevant content.
Whenever you reorganize a site or move files around for
other reasons, you have to make sure that the old URLs continue
to work. Old URLs should be kept functional for at least half a
year, and preferably for two years or more.
|
The preferred way of dealing with virtual URLs is to pre-assign
an archival URL to the page and have a method for communicating
this permanent URL to authors of other sites who want to link to
you. For example, http:// www.foo.com/current/editorial.html
could be the virtual URL that always points to the current
editorial, and http://www.foo.com/990207/editorial.html could be
the permanent URL pointing to the editorial for February 7, 1999.
The permanent URL should be made active as soon as the page goes
up, even if most users will be using the virtual URL to access it
in the beginning. The reason to activate the eventual archival
URL while the page is still current is that other sites that want
to link to the page will get the ability to encode the permanent
URL in their links and forget about it.
Basically, there are two ways of communicating archival URLs to
other authors. You can list the URL in a footer on the page
(e.g., "the permanent location of this page will be
http://www.foo.com/990207/editorial.html"), or you can
use a simple convention for generating archival URLs. Using a
convention frees you from having an extra line on the bottom of
your pages (which is good) but places an extra burden on people
who want to link to you (which is bad and may cost traffic). Only
use a naming convention if it is (a) adhered to consistently, and
(b) very easy to guess from seeing one or two examples of older
pages and their archival URLs. A good example might be the use of
the publication date in the URL for a regular column.
Advertising a URL
To integrate your online presence and your real-world activities,
all advertising and marketing collateral should come with
appropriate URLs pointing to your website.
Any physical products should also come with URLs for their
corresponding product pages engraved or stamped on the back.
Making the URL part of the product ensures that users can easily
get service without having to search the site. It also makes it
easy for customers to recommend your product to new prospects,
and it enhances the probability that they will return to your
site when it is time to buy a replacement or make another new
purchase.
URL Design - Page 29
Designing Web Usability
Supporting Old URLs - Page 31
|