How to name and store files of your website


Storing Your Files

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.

Naming 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.

Make the Names Simple

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.

Always Use Lower Case

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.

Don’t Use Spaces

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.

Keep All Your Web Files in One Place

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.

Have an Organizational Structure

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.

Legal Disclaimer

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

Related Articles

1. Downloading and uploading different file types from an FTP Server
Uploading Files to the Internet After your website is finished and ready to go live, you need to move the files onto a computer (your web server) on which you a...

2. What pages and advertising should my website have
Content Best Practices The subject of your content is really up to you, but there are some best practices for any content. Content should be personal - ...

3. How to create a MySpace profile to build your Social networking experience
One of the benefits of these websites is that they allow you to promote your website to other people. I am a member of all of these websites, and when I publish a new b...

4. How to set up and edit the MySQL database
Setting up the MySQL Database It's almost time to install WordPress, but first, you need to create a MySQL database for WordPress to store all your content and ...

5. How to efficiently manage user accounts and profiles in WordPress Blogs
How to manage user accounts in your WordPress Blog The software is installed and running, and you've logged in to WordPress as an administrator. I bet that yo...

6. Tips for future proofing your WordPress Blog
How to future proof your WordPress Blog There's one last bit of business to take care of before I delve into populating your WordPress Blog with some awesome ...

7. Reading is another aspect of blogging
Reading Settings The other side of the blogging coin is reading. Your WordPress Blog won't be much fun if no one reads it, though don't be fooled into thinking ...