Proper Naming Conventions
The primary concern for any web developer should be accessibility. Is your site designed to be easily accessible to the wide variety of browsers that are currently available? One of the ways you can ensure that your site is user-friendly, is to ensure that all files follow these naming rules:
- File names should accurately describe the data contained in the file. For example, a picture of the WSW building could be titled: WSW instead of a less descriptive name such as: picture1.
Please Note: Digital cameras assign default names to pictures. These names are not appropriate to use on the web. For example: DSC1123.jpg. You should rename these files before you upload them to the CMS. - While file names should accurately describe the information contained in the file, they also should not be overly long. Where and when appropriate use well known abbreviations. For example, instead of "department_information" use "dept_info".
- File names should include only letters, numbers, dashes ("-"), and underscores ("_").
- All files names should begin with a letter, not a number.
- File names should not contain any symbols ("%", "$", "#", ".", ",", etc) or spaces. Only underscores and dashes should be used to separate words or dates. For example: 1-2-2007 or former_student are acceptable.
These simple rules should be applied to all files and folders contained in the CMS. This includes: pictures, Word documents, PDF files, and web page (.htm) files.
Examples of Appropriate File Names
The file names listed below follow the proper naming conventions and may be used as examples when trying to name your files:
- meeting_minutes-2007
- WSW_800
- Smith_testimonial
- ITS_staffpic
- notes-2-2-2007
Examples of Inappropriate File Names
The file names listed below break the rules outlined in the proper naming convention and should be used as examples of how not to name your files. After the example file name, the reason it should not be used is listed.
- 1-2-07_minutes : A number is the first character in the name instead of a letter as outlined by the Proper Naming Conventions.
- DS12345 : File name is not descriptive.
- meeting_minutes_for_first_meeting_of_year: The name is rather long, and would become cumbersome to write when linking from other areas.
- Student housing : Contains a space, only "-" and "_" should be used to separate words.
- howtomake$$$ : Contains a symbol, only "-" and "_" should be used.
- my.image : Contains a "." and is not descriptive.
Suggested Naming Practices for Images
When you are trying to name an image or picture file, the Proper Naming Conventions should be applied, but you may consider employing these additional rules:
- If you plan on having more than one size of an image available, put the pixel size on the end of the file name. For example: "WSW_800" and "WSW_100" for pictures of the WSW building at 800 by 600 pixels and 100 by 75 pixels, respectively. See the style guide on "Image Sizes: Working with Pixels" for more details on measuring pictures by pixels.
- Make sure the image files are not named with the extension in all capital letters. The CMS will not recognize images named in this manner. For example: mypic.JPG. If your image is named with an all caps extension, please refer to the "Working with Files" tutorial for tips on how to fix the problem.
