Before you start thinking about moving your files to and from the Internet, it’s important to take some time to organize your files on your own computer.
Keeping things organized is going to make it easier to find things and ensures fewer errors when moving files. This section covers some best practices for your file storage and introduces you to a more efficient way of storing things.
A common problem with new web developers is that they often reference files incorrectly. This can cause all sorts of problems and can drive you nuts if you don’t organize your files.
One question you’ll probably ask when you create files to use on your website is, “What should I name this file?” You really can name your files just about anything, but here are a few simple rules you should follow.
Try to keep your names as simple as possible and be as descriptive as possible. The description might be the file’s purpose and dimensions. For example, instead of calling a graphics file picture01.jpg, maybe try logo125x125.jpg. This way you know the file is a logo, and you know its size without ever having to open it.
With some servers and web hosts, the case of a file you are referring to needs to be very specific. If a server has the file named in uppercase LOGO.gif and you make a reference in HTML to the file using lower case, logo.gif, the server might not know you mean the same file.
By keeping all your filenames lower case you make sure you are always going to have clean references.
Using spaces in a filename is not a good idea. When a browser encounters a space in an HTML filename it fills it in with %20. So,
bobshouseofpancakes.com/our menu.html
becomes
bobshouseofpancakes.com/our%20menu.htm
Because this is not the exact name of your page, referring to it this way makes the page impossible for your browser to find. You don’t have this problem if your filenames have no spaces.
If you need to use a space, one solution is to use an underscore, which is the character above the subtraction (-) sign on most computers. Usually, you press the subtraction key and Shift at the same time. This changes the filename reallylongconfusingfilename.html to really_long_confusing_file_name.html. The filename is easier to read, and with no spaces you don’t run the risk of a bad HTML address.
This might seem like a simple thing, but storing your files in one place on your hard drive is sometimes overlooked. Keeping your HTML files, images, and scripts straight on your computer is going to make your life much easier in the long run. This is especially true if you are working on more than one website at once.
After you have all your files in one place, the next thing you want to do is organize them. This makes it easier for you to find what you are looking for and to store new files. There are any number of ways you can do this, but when I am working on multiple websites, I use folders to store all the pieces of one website in one place. Within the website folder, I have folders for HTML files, graphics, and multimedia scripts. By creating the same directory structure each time, I find things more easily and have fewer reference errors in my code.
Our website is not responsible for the information contained by this article. Webworldarticles.com is a free articles resource thus practically any visitor can submit an article. However if you notice any copyrighted material, please contact us and we will remove the article(s) in discussion right away.
This article was sent to us by:
George T. at
01142010
1. Downloading and uploading different file types from an FTP Server
All articles in this directory are property of their respective authors. Additionally, read our Privacy Policy
© 2010 WebWorldarticles.com - All Rights Reserved.