The specific server software used on the computer system you're
using may place certain restrictions on how you organize certain
categories of web-related information. For example, it may be
necessary to place all cgi support programs in one directory (note:
make sure that such a directory is not in any of your public web
directories) or all context sensitive maps may have to be placed
in one directory.
As a guest on a shared computer facility, you are likely to encounter
specific restrictions enforced by that facility's administrator.
Such restrictions are usually placed on you in order to protect
other parts of the system's operation and to make system administration
manageable. Examples of such restrictions include specific file
naming conventions for your index file(s), restrictions on the
location of coordinate files for context-sensitive maps, and file
naming conventions on form and map files.
Any CGI scripts that you wish to use should be reviewed by the
system administrator before they are put into production. These
scripts can pose system security risks, and this needs to be checked
for beforehand.
Image files should be kept in the same directories as the associated
html file that references that image. An exception occurs in the
case of an image file that is used in several different html files
that are in different directories (e.g., a frequently used or
global image). In those cases the image should be placed in a
common image directory at the top of the public html file area,
so that they are readily available to all html files below the
top (root) directory. (Placing commonly used global images in
such a central location will also reduce the amount of work the
browser has to do each time such an image is used.)
When selecting images to be included in your web material, "smaller
is better," particularly for material on opening or home
pages. If large images are desired, it is strongly recommended
that a "thumbnail" version of the large image be the
default image displayed. This thumbnail image can then reference
the full image, so that the user can click on the thumbnail image
to obtain a copy of the full image.
To help the viewers of your web pages, you should provide some
information on the size of an image that will be transferred to
the user's browser for links that are associated with image files.
This way a user connected to the web via a slow modem has an idea
how long a particular linked image will take to load.
Text files should be limited in size, since users frequently have
to wait for all the information to be transferred to their (browsing
software on their) computer before they can work with the information.
And the transfer time can cause significant user delays, especially
if the user is connected to the web over a slow modem. A suggested
rule-of-thumb for the maximum size of a text html file is 20,000
characters (20k). Should a file become larger than that, it should
be broken into two or more smaller files linked in the appropriate
ways.
Users of DOS/Windows-based computer systems deal with filenames
and directory names that are all in upper case letters. However
in html information, the case used in link references to html
file names is case sensitive. File and directory names should
be carefully chosen so as to convey useful information yet not
be so long as to cause an absolute reference to the material involved
to be too long a string in the referencing web material.
An example directory for a complete set of web materials is shown
in the figure below. The HOME_DIR represents the root of a particular
set of html material and may be a few levels below the root of
the host system. Within that HOME_DIR the subdirectories should
be the major supporting parts for this web material; e.g., the
cgi-bin directory contains the CGI scripts used, the image_map
directory has the coordinate files for context-sensitive maps,
and the public_html directory contains the actual html material
that will be viewed by users' web browsers.
The root of public html area (public_html in the example) should
just contain your index (or home) html file, the directories for
each major category in your index file, and any supporting html
and image files. Each subdirectory of your public html directory
should try to follow the same philosophy, i.e., an index or main
menu file plus supporting files and subdirectories for each major
category in that area. This way if a subdirectory has to be moved
to another area of the computer file system (or even to a different
computer system), very few links need to be changed in the html
material that refers to the material in this subdirectory.
Two important related guidelines regarding the use of links within
html documents:
- Use relative addressing for links wherever possible. For example,
A HREF="../mystuff.html" is much better than
A HREF="http://www.mysystem.edu/general/particular/mystuff.html"
- Structure your material so that links within a html document
never go more than one level down in the file tree from the present
location in the file tree.