Time2Dine.co.nz is Online Restaurant Booking
 
 New Zealand Restaurants Forum
Restaurant Forum | Contact Time2Dine | Book Online & Save | About Time2Dine

Go Back   New Zealand Restaurants & Food Forum > Search Engine Optimisation > HTML & Javascript Howtos
Register

Reply
 
LinkBack Thread Tools
  #1  
Old 12th Mar 09, 12:17 AM
Junior Reviewer
 
Join Date: Mar 2009
Posts: 1
orion is on a distinguished road
Default Avoid Spaces in Your Filenames

One of the common beginner's mistakes when naming filenames is to put spaces in the filenames. Obviously, modern operating systems like Windows, Linux, Mac OS X, etc, allow filenames to contain spaces. On Web Designers own computer, having spaces in the filenames improve the general usability of your system, since the spaces separate out the words in the name and let you quickly locate the file you want at a glance (provided of course you named your files sensibly).

However, spaces in web files are problematic. Let's take a file named "lousy web page filename.html" as an example. How do you form a web address ("URL") from such a filename? Webmasters new to URLs may think that "http://www.example.com/lousy web page filename.html" is the right form, but they will be wrong. Web browsers and search engines do not expect spaces in URLs. Every space has to be replaced by "%20" (without the quotes). The correct URL for such a file should thus be

"http://www.example.com/lousy%20web%20page%20filename.html".

If you use a WYSIWYG web editor like Dreamweaver or KompoZer, you may not realize this, since such web editors handle the replacement of spaces with %20 transparently for you.

The problem comes when you manually add a link to that page from another page, and you forget to replace all the spaces with the encoded "%20" form. Don't think that this is an unlikely event. I can't even begin to count the number of new webmasters who have written to me asking why they get a 404 Page Not Found error when they link to another page on their site that they know exists. When they tell me the filename of that page, the answer becomes obvious.

Avoid this problem by not using spaces at all in your filenames. Filenames with spaces work fine on your own hard disk. When you create files for the web, the mistakes that can happen with space-filled filenames, as well as the tedium involved repacing all those spaces with "%20", is just not worth the trouble.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Powered by: vBulletin Copyright ©2000 -2012, Jelsoft Enterprises Limited.
Search Engine Friendly URLs by vBSEO 3.2.0
© 2010 Time2Dine