W3C home > Mailing lists > Public > www-validator@w3.org > July 2008

Re: Slash

From: Rui del-Negro <w3validator@dvd-hq.info>
Date: Mon, 14 Jul 2008 02:21:37 +0100
To: www-validator@w3.org
Cc: linux_mike@paradise.net.nz
Message-ID: <op.ud9cqbtjjf0k3w@bigbang>

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

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

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:56 UTC