| To give a
definitive answer to this and put this frequently-asked question to
rest:
You should *never*
use spaces in file or directory names on the Internet.
The use of spaces in
file and directory names is strictly a Windows convention --
perfectly permissible (and almost encouraged) on desktop boxes
running the Windows operating system. It is also permitted and
perfectly functional in Microsoft browsers.
The Internet in
general and most servers in specific, however, remain devoted to
UNIX-based naming conventions.
Aside from some
servers still having difficulty with this, older browsers (notably
Netscape 4.x and prior) will see a space in a URL as the end of the
URL, and truncate (ignore) everything after the space. For
instance, this URL
http://www.somewhere.com/my
directory/some page.html
would be seen as
http://www.somewhere.com/my
with the usual result
being that older browsers will wind up reporting a Bad
Request or a 404
- Not Found.
The usual method of
correcting this is to replace the spaces with _ underscores, like
this:
http://www.somewhere.com/my_directory/some_page.html
While it is indeed
true that Microsoft Internet Explorer and newer Netscape (and
some other non-Microsoft) browsers will replace the spaces with %20
and proceed properly, there can still be problems with breaking
certain JavaScript scripts, some Perl and PHP scripts, and other
services, if spaces are used anywhere in a URL.
Until recently, this
could also cause problems with (legitimate) search engines, 'bots,
and crawlers; and the situation may remain so with some of
them. A more serious nuisance is off-brand private 'bots and
"site downloaders" that haven't the sense to properly
interpret a space, and fall into endless loops calling non-existent
pages on your site thousands of times at relatively high frequency
-- often burning enormous bandwidth and potentially causing server
problems.
In view of these
considerations, if you have spaces in directory or file names, it's
wise to correct them as noted above -- sooner rather than later! |