Re: WHICH HTML-CODE is better to use?


In article <>,
Clive Thomas <> wrote:
> In article <>, "Arnoud \"Galactus\"
> Engelfriet" <> writes
> >> <A HREF=""></A>
> >> <A HREF=""></A>
> >
> >These are both legal. The starting / in such an URL is optional.
>         It's optional, BUT, 

Nothing "but". In the URL given above, the *OPENING SLASH* after
the hostname is optional. The trailing slash (note: different term)

> if it's missing then the server has to
> 'think' about it, 

The server does no such thing. It simply looks at the browser's
request, sees that the browser asked for "/about" but about is
a directory, and gives it the HTTP equivalent of "That document has
moved, it's now >here<" with the corrected URL. 

> whereas if it's there the server 'knows' it is looking
> for an index.htm or index.html and so is a little faster.

When a browser asks for "/about/", the server will usually look for
a directory index file (typically named 'index.html' although this is
a server option[0]) and send its contents back. If the server finds
no such file, it may generate a directory index or tell the browser
to shove it.

The browser does _not_ ask for the directory index file itself, as
it does not know how the server is configured. Of course, there may
be morons who do not understand the above, and link to the directory
index file directly. My opinion on that kind of people is that they
should be taken out and shot, but I am required to point out that this
is not the opinion of the WDG.

[0] So "why are these morons linking to index.html" is also a valid
name for a directory index filename, assuming the OS/filesystem supports
long filenames with spaces in them.

- -- 
E-mail: .................... PGP Key: 512/63B0E665
Maintainer of WDG's HTML reference: <>


Received on Saturday, 12 April 1997 16:13:02 UTC