Naming Files
Filenames are important because they are used when linking to other documents (such as webpages, images, Word documents and pdfs). To ensure files can be correctly identified, care should be taken to avoid confusion in naming files. The use of different case (lower/upper), special characters and spaces can all cause confusion when linking files or attempting to open them in a browser. To avoid this, some guidelines have been set for naming files that make up the University of Adelaide websites.
Filenaming Guidelines
Filenames for all files within University websites, whether they are webpages, documents, pdfs or images, should be made up of only lowercase letters, numbers, hyphens (dashes) and underscores. This means that uppercase letters, spaces and punctuation or other special characters should not be used in filenames on University websites. Using hyphens to separate keywords in your URLs can help maximise the searchability of your pages.
Case Sensitivity
The University web servers use the unix operating system which uses case-specific filenaming. Even when a link appears to be correct on the local computer, if the file is named using uppercase letters, the links may not work correctly on the server.
Spaces and Special Characters
Spaces should be avoided in filenames as a space is not a valid character in a URL. Most browsers will convert spaces in a linked URL to the standard replacement characters "%20" and will be able to locate the page, however this is not guaranteed. For example, the file "university of adelaide.html" will appear as "university%20of%20adelaide.html".
Even when a browser is able to deal with spaces by using the %20, plug-ins that open .pdfs or .doc files may not perform the reverse conversion and a linked file may fail to open.
Default Filename
Throughout the University of Adelaide website, the default filename for each folder is index.html. This means that when a URL specifying a folder name rather than a file is entered in a browser for a University of Adelaide site, the server searches for, and displays, a webpage called index.html located in that folder. If the index.html isn't found, a list of the files is displayed instead. To avoid this happening, always make sure that every folder in the site contains an index.html file. Therefore it is recommended that the main file in each folder be called index.html. For example, http://www.adelaide.edu.au/current/ will open the index.html file saved in the current folder automatically.
It is particularly important that an index.html page be located in the home folder of each site, as users expect to be able to go to a site by entering a URL ending in a folder name rather than having to specify the file at the end. If the file is not available and they are shown a file listing when attempting to access the site, it appears unprofessional and they are likely to give up on viewing the site.
Reusable Filenames
Where possible, name documents so that links to the file will not need to be changed when the document is updated or replaced in the future. Avoid using dates or version numbers in the filename so that later versions of a document can be uploaded over the original version to update the information without the need for changing links. For example, if the annual report for your area is available on your website, consider naming the document annual_report.doc or annual_report.pdf rather annual_report_2006.doc or annual_report_2006.pdf. When the following year's annual report is available it can be uploaded with the same filename and all links to the file will continue to work as before.
Extensions
Because the web server used for the University of Adelaide uses a unix operating system, the preferred extension for web content files is .html rather than .htm. Therefore the default webpage in each folder should be index.html and all other webpages within a folder should contain the .html extension. Standard extensions should be used for other documents and filetypes. Common filetypes are:
- .doc : Word document
- .pdf : PDF (Portable Document File)
- .jpg, .jpeg, .gif, .png : image files
