Re: Incompatibilities in IE and Netscape: HTML & Javascript

by "Harold A. Driscoll" <harold(at)driscoll.chi.il.us>

 Date:  Fri, 18 Feb 2000 01:49:39 -0600
 To:  Michael Channing Wilson <mwilson(at)sigmapath.com>
 Cc:  Dennis Lapcewich <Dennis.Lapcewich(at)unisa.edu.au>, hwg-languages(at)mail.hwg.org
 References:  interaccess
  todo: View Thread, Original
At 00:50 18-02-00 , Michael Channing Wilson wrote:
>A few quick thoughts here. I realize that you _can_ 
>use spaces in file names 

Yep.

>and that the browser/server/whatever replaces those 
>spaces with the 20% thingy, 

Nope. Since by definition a URL can _never_  contain a space character, the
browser/server has no occasion to make such replacements. Whatever MS IE
does in the arena hardly qualifies as standards-compliant or well-behaved.

>but why would you? 

Because that is the names that the files have, perhaps. When the Web is an
ancillary part of an existing system, for example, it may well be best to
respect extant practice.

>I would say that it is good practice to refrain from 
>using spaces 

Such is certainly a convenient thing to do, when one has the opportunity to
do so (and of course one often does).

>while using the "_" in place of a " ". 

Choice of substitute character is arbitrary and a matter of preference. Two
substitutions already exist in common convention, use of %20 for space, and
use of + for space. Others, such as _ and dot are used in some
applications, so there are lots of possibilities. So, heck, you can use
whatever you desire... but I'd hardly think that any one (such as your
suggestion of _) is inherently correct.

>Do all pages render correctly in all browsers when 
>a space is used in a file name? 

Yes, of course, in any but seriously-broken browser, of which I'm not aware
of any.

>How do you "specified correctly"? 

See the URL specification for details.... but briefly you just need to
represent any spaces as %20.

>If I remember correctly..., I used a space in an image 
>name and it was broken when a Unix served the
>.html file.

Are you referring to the name of the file (on the local file system) which
(on some file systems) can contain a space, or the URL of the image (which
needs to have any spaces quoted as %20)?

If used correctly, spaces can be used... I've no disagreement with a
recommendation that they are best avoided... only dispute the statement
that they can not be used.

Safe computing,  /Harold
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Harold A. Driscoll                 mailto:Harold(at)Driscoll.Chi.IL.US
#include <std/disclaimer>                 http://Driscoll.Chi.IL.US

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA

This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.