|
||||
|
Organizing and Naming Your SiteSite Structure || Organizing Files and Folders || Site StructureWeb sites consist of a collection of files. These files may or may not be organized within a directory structure of folders. The location of files in the web site corresponds with the URL.
Consider this Sample site: Within the site, there are two files (web pages): tutorial1.htm and tutorial2.htm. Let's say that this web site is stored on a server located at http://www.sample.edu. In order to reach the tutorial1 page, we would have to go to:
Yet, if we wanted to visit the tutorial2.htm page, we would only need to go to:
Each folder within a site is represented by the folder
name and a slash (/) in the URL of the corresponding web address. And each folder within a folder represents a "level" The address to the tutorial1 page is also called a "deep link" because it directs the visitor several levels into the web site. Deep links can be useful for pages you don't intend visitor's to arrive at directly (when you want to control the order in which visitor's view pages). However, because they result in long URLs that are difficult to remember, they should be used sparingly for information that will be regularly accessed or for high-traffic pages. Shorter URLs are easier to advertise (better for you) and easier to remember (better for your users). Organizing Files and Folders.While it is not a good idea to have too many levels (embedded folders) within your site, it is also not a good idea, unless you have a very simple site, to have no folders. Here is an example of a site with no organizing structure:
Because the site is small, it is not difficult to distinguish between the pages (.htm) and the images (.gif). But sites can grow quickly:
Default and Index Pages
For example, let's consider again the sample site from "Site Structure" above. There is no default or index page in the "sectionone" folder. This URL will work:
This URL will not:
Depending on the server settings, the user who types the second URL will see a "File Not Found" message or a plain-text display of an alphabetical list of all the files, including image files, in that folder -- without indication of which page the user should look at first. However, if we copy and rename tutorial1.htm to default.htm or index.htm, both URLs will work. Thus, it is good design practice to name one file in each folder within the site either default or index. Note: if you have a folder with both a default and an index page, which page gets displayed depends on your server settings. However, most servers choose the default display page by alphabetical order. Naming ConventionsFor best results across various servers and with different browsers, when naming files and folders within your web site:
|
|
Organizing and
Naming Your Site | Layout | Header
Information | Navigation | Color
| Style Sheets | Lists
| Images and Multimedia | Image Maps | Tables
| Forms | Frames | Scripts |
Timed Response | | View the entire tutorial
in HTML format. | |