Re: WHICH HTML-CODE is better to use?

-----BEGIN PGP SIGNED MESSAGE-----

In article <lgsxcDAmipTzEw7A@tlc1.demon.co.uk>,
Clive Thomas <clive@tlc.demonic.co.uk> wrote:
> In article <tsPTz4uYORzF089yn@htmlhelp.com>, "Arnoud \"Galactus\"
> Engelfriet" <galactus@htmlhelp.com> writes
> >> <A HREF="http://www.charliesangels.com/">CharliesAngels.com</A>
> >> <A HREF="http://www.charliesangels.com">CharliesAngels.com</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)
in "http://www.charliesangels.com/about/" is NOT OPTIONAL AT ALL.

> 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.


Notes:
[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: galactus@htmlhelp.com .................... PGP Key: 512/63B0E665
Maintainer of WDG's HTML reference: <http://www.htmlhelp.com/reference/>


-----END PGP SIGNED MESSAGE-----

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