Reply to Re: Question on html command

Your name:

Reply:


Posted by Els on 07/31/06 06:38

Alan J. Flavell wrote:

> On Sun, 30 Jul 2006, Els wrote:
>
>> http://example.com/somewhere/
>> http://example.com/somewhere
>>
>> The first one points to the index file (if there is any) of the
>> directory with the name 'somewhere'.
>
> indeed.
>
>> The second one points to a file by the name 'somewhere' in the root
>> directory. Most servers though, are set up to respond to the second
>> one as if there was a trailing slash,
>
> Er, no, most servers are set up (at least if the directory exists) to
> resopond to the second one as if there *ought* to have been a trailing
> slash. But in order to get there, it has to send the client agent
> this new URL, and wait for the agent to respond to this completely
> unnecessary additional transaction (= network overhead) by requesting
> the corrected URL which it ought to have requested in the first place.

So.. those pages that actually use filenames without extensions are
all on servers that are configured differently from the default
configuration?

> As I suggested on another newsgroup recently (and got rewarded by an
> email full of personal abuse from the author of the defective web
> page), it's a good idea to visit the intended URL with a conforming
> web browser (i.e better not MSIE), and afterwards, copy/paste the URL
> out of the web browser's URL field into the document being authored -
> so, if the URL was in some need of fixup, it's been corrected for you,
> and typos can be ruled out.

These two links:
http://www.w3.org/TR/REC-CSS1
http://www.w3.org/TR/REC-CSS2/

Are both valid and correct. If you add a slash after the first one,
you'll get a 404. If you leave out the slash from the second one, the
browser (even my IE6) will add the slash.

You're saying their server is configured differently in that respect
than other servers? Or perhaps I'm misunderstanding what you wrote
about the extra communication between the server and the browser...

>> as soon as it detects that there is no file by the name of
>> "somewhere".
>
> Despite the fact that in unix-like filesystems you can't have a
> directory and a plain file with the same name, it's certainly feasible
> to configure a web browser so that it responds with completely
> different results for "somewhere" and "somewhere/" - but, due to its
> unfamiliarity, I wouldn't recommend it to anyone, other than to
> demonstrate the possibility for tutorial reasons.

Agreed. The above example I gave was a surprise to me, and I only
found my error (added a slash on the first one) cause I checked my
pages for dead links with a linkchecker.

--
Els http://locusmeus.com/
accessible web design: http://locusoptimus.com/

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация