Re: How can one use '#' in a URL?

Tim Berners-Lee (timbl@www3.cern.ch)
Thu, 24 Jun 93 15:25:55 +0200


>Date: Fri, 18 Jun 93 15:41:47 BST
>From: "Peter Lister, Cranfield Computer Centre"
<ccprl@xdm001.ccc.cranfield.ac.uk>
>
>> I don't think this is correct. Any url can make use of the #
directive.
>> It just tells a browser to go to a specific part of a document
instead of
>> to the beginning. I don't know of any browsers that actually
'generate'
>> these internally.
>
>Misunderstanding. I mean to say that I don't know how or whether
>servers will react to # in a URL; as far as I am aware, browsers
simply
>react to them when they see them in an HTML file.

The # is a delimiter which separates the opaque part of the
URL which is passed to the server from the opaque part of
the URL which is passed to the displaying application.
There is no way you can pass a URL containing # to a server,
as that is precicely what it does not mean.

If you want to make a special world around tar files, then
do, but use valid characters. If you want to avoid using
things which might crop up in the file names, then the %
character is there which with non hex characters gives
all sorts of combinations -- like %/ mentioned before to
mean "interpret that which is on the left with respect to
that which is on the left". You could use this for
tar files too, in your server:

/docs/foo.tar%/bar.c extraction
/docs/foo.tar%L listing
/docs/foo.tar%LR deep listing
/docs/foo.tar the file itself

for example. Remember that this string will be passed
straight to the server and the client is not allowed
to interpret it at all. The bit to the right of the #
is the reverse: it is never passed to the server,
only the client (the presentation app) can interpret it.

>Further, is a null search term significant or not? Is "foo?"
equivalent
>to "foo". I would personally hope NOT, as a null default search term
>could be useful (e.g. to return a catalogue).

They are different. Some servers return the same thing for the
two different URLs. I am not sure which browsers actually support
an empty search string. I agreee it is logical to do so. You should
NOT assume any convenmtion for what it means. For example,
if the server ANDs its terms, you might expect he catalogue, while
if it ORs them you would expect nothing back. If you want to
make the catlogue available, it is MUCH better to make a link
to it from the index cover page.

Tim BL

>Peter
>
>