http://www.ustc.org/webcourse/browser/usa2.gif
A sound file at
http://www.ustc.org/webcourse/browser/hasta_la_vista.au
A movie file at http://www.ustc.org/webcourse/browser/goldgate.mpg
Therefore, we see that a URL address is a very powerful thing, allowing us to
address many different kinds of files.
Comments: Case Sensitivity
This is as good a place as any to issue a warning about a common pitfall in
accessing directories and files on the Internet. Some computer systems (for
example, Unix) use case-sensitive names for files and directories;
others, (for example, Windows and Macintosh) ignore the case in such names.
Thus, on a Windows computer
file1 and File1 refer to the same files,
but on a Unix system these would generally be two distinct files.
You can come to grief over this in the following way:
Suppose you have a GIF file
named myfile.GIF on your Windows computer and you access it locally from your
browser using a Web link of
the form
This will generally work on your Windows computer because it views myfile.gif
and myfile.GIF as the same files.
Confident that everything is
working as it should, you now transfer
the file containing this link and the GIF file to a Unix Web server and try to
access this link over the Web.
To your dismay, you (and anyone else on the Web trying to access your file)
will now get an error message that the file
myfile.gif is not found on this Web server. Why? Unix is case
sensitive, therefore (unlike the Windows computer that you used to develop the files),
the server views myfile.GIF as
being a different file from myfile.gif; therefore it croaks. The
only cure in this case is to change either the filename in the link or the name
of the GIF file so that the names are case compatible.
Comments: Blank Spaces
A second pitfall in Web addressing is associated with the fact that
different systems deal with blank spaces in file or directory names in
different ways. For example, Windows file names can have blank spaces, but
Unix systems generally use blank spaces as separators between names. Thus, a
filename July Budget Reports is a perfectly acceptable filename for
Windows, but is a bad choice for a Unix system because it will interpret this
filename as July because of the trailing blank space unless special
actions are taken (for example, always enclosing the entire filename in double
quotes would cause a Unix system to construe the blank spaces as part of the
file name).
The common ways that Unix systems name such files without employing
blank spaces is to use upper case letters to start words (with no blanks between
words), or to use underlines
or dashes to indicate where blank spaces would be. For example,
- JulyBudgetReports
- July_Budget_Reports
- July-Budget-Reports
would all be acceptable Unix filenames.
Words to the Wise
Now if you are a Windows user developing your own material for the
Web,
you probably would like to ignore these
"peculiarities" with Unix systems concerning case sensitivity and blank spaces.
Unfortunately, you cannot
because most of the servers on the
Internet use Unix operating systems, and indeed the Internet itself largely
developed in a Unix environment. This has two consequences:
-
Because of
the Web's
Unix heritage, URL addresses generally cannot contain blank spaces (if
blank spaces are required they must be inserted with special character
sequences).
-
If your
Web material is served from a Unix server, the case of filenames and
directories will matter.
Therefore, if you are going to be developing
material for the Web, we
suggest strongly that
you immediately get into the habit of (1)
assuming case sensitivity in all your filenames, and (2) not using blank spaces
in any filenames.