HTML and CSS Reference
In-Depth Information
they either cut you off or start charging you more money. You should ask what
your bandwidth allotment is and make sure that you have enough to cover the traf-
fic you anticipate. (The bandwidth allotment from most web hosts is more than
enough for all but the most popular sites.)
Do you provide any canned scripts that I can use for my web pages? If you
aren't keen on writing your own scripts to add advanced features to your pages, ask
your service provider whether it provides any scripts that might be of assistance.
For example, many ISPs provide a script for creating an email contact form. Others
might provide access to form-processing scripts, too.
n
Keeping Your Files Organized with Directories
Probably the easiest way to organize your site is to include all the files in a single direc-
tory. If you have many extra files—images, for example—you can put them in a subdi-
rectory under that main directory. Your goal is to contain all your files in a single place
rather than scatter them around. You can then set all the links in those files to be relative
to that directory. This makes it easier to move the directory around to different servers
without breaking the links.
Having a Default Index File and Correct Filenames
Web servers usually have a default index file that's loaded when a URL ends with a
directory name rather than a filename. One of the questions you should ask your web-
master is, “What's the name of this default file?” For most web servers, this file is called
index.html . Your home page, or top-level index, for each site should have this name so
that the server knows which page to send as the default page. Each subdirectory should
also have a default file if it contains any HTML files. If you use this default filename, the
URL to that page will be shorter because you don't have to include the actual filename.
For example, your URL might be http://www.example.com/pages/ rather than
http://www.examplecom/pages/index.html .
20
CAUTION
If you don't put an index file in a directory, many web servers will
enable people to browse the contents of the directory. If you don't
want people to snoop around in your files, you should include an
index file or use the web server's access controls to disable direc-
tory browsing.
Also, each file should have an appropriate extension indicating its type so the server can
map it to the appropriate file type. If you've been reading this topic in sequential order,
 
Search WWH ::




Custom Search