[Web4lib] white space in web pages

Richard Wiggins richard.wiggins at gmail.com
Mon Jul 24 15:03:44 EDT 2006


Like Thomas, I think the problem has to do not with "inserting" extra line
breaks and white space, but failing to translate them properly from one
operating system to another.  Windows likes CR/LF and Unix and other systems
likes LF.  In ASCII mode, FTP is smart enough to translate the line ends
from one convention to the other.

This might not affect the serving of the HTML or its interpretation by a
browser, but it might make it harder to edit or examine the source.  If
you're editing on the Mac and serving from Windows, you'd get one long line
of code, I think, unless you use an editor that's smart.  (Cue the
commercial with the "I'm a PC / I'm a Mac" guys...)

Couldn't you get into trouble if you are using a double byte character set
on one side and not on the other as well?

The safest thing to do is to send text files in text mode, and binary files
in binary mode.

/rich

On 7/24/06, Thomas Dowling <tdowling at ohiolink.edu> wrote:
>
> On 7/24/2006 12:52 PM, Nancy E. Sosna Bohm wrote:
>
> > This post doesn't seem to have shown up during the technical
> difficulties on
> > the list last week.
> >
> > Has it become an acceptable practice to ftp html docs in binary instead
> of
> > ASCII?
> >
>
> I don't see how transferring HTML in binary could do anything more
> serioius than leaving the final copy with Carriage Return-Line Feed
> pairs at line ending instead of just Line Feeds.  As far as any browser
> or other HTML parser is concerned, that just puts two whitespace
> characters where one would have been, and since the browser will
> collapse multiple whitespace characters into one space, it won't make a
> difference.
>
> As for scripts, I'm not aware of what could break with a CRLF instead of
> a just a line feed.  But that may suggest a need to put your scripts in
> separate .js files (which also simplifies HTML validation in a lot of
> cases).
>
> BTW, how have you confirmed that the HTML files are really being
> transferred in binary?  I find it passing strange that Dreamweaver would
> do something that loopy.
>
>
> --
> Thomas Dowling
> tdowling at ohiolink.edu
> _______________________________________________
> Web4lib mailing list
> Web4lib at webjunction.org
> http://lists.webjunction.org/web4lib/
>
>


More information about the Web4lib mailing list