Re: Slash

>> > <soundguy@centrum.cz> wrote:
>> >
>> > http://validator.w3.org/check/referer works
>> > http://validator.w3.org/check/referer/ doesnt work
>> > id like to use the second way with slash as the last character of
>> > url:-) it looks better

>> olivier Thereaux wrote:
>>
>> Aesthetical considerations aside, is there any practical benefit to
>> the version with a slash at the end?
>>

> Michael Adams <linux_mike@paradise.net.nz> wrote:
>
> Some programs (apache?) append it by default. Type www.validator.w3.org
> into a browser and the slash appears. Copy and paste then copies the
> slash.

"www.validator.w3.org" is a server name. When you request something from  
the server you request a resource. In other words, it makes perfect sense  
for the browser to add the slash. If you type  
"www.validator.w3.org/something", however, no slash will be added, because  
"/something" is considered to be the resource you're requesting.

If the resource is a folder, the server might redirect you to  
"/something/", to make it clear that it's listing the contents of a  
folder. If the resource is not a folder, no slash will be added.

Since "http://validator.w3.org/check/referer" does not refer to a folder  
(it's just a construct that tells the validator to check the page listed  
in the HTTP referer field), the server won't add the slash, and in fact  
the slash makes very little sense. Personally I find  
"http://validator.w3.org/check?uri=referer" a lot more logical.

RMN
~~~

Received on Monday, 14 July 2008 01:22:27 UTC