Nomenclature

mairving's picture

They have: 2,256 posts

Joined: Feb 2001

Sorry I had to use such a fancy term. I am curious as to how others go about naming files. If you have a small site it doesn't really seem to matter. But if you have a large site, it can be a bit of a problem.

Let's say you have a home page with 10 pictures on it and 10 links.
The pictures are:
Car, bicycle, truck, plain, train, scooter, motorcycle, bus, rocketship & a pair of Nikes.
The links are the same as the pictures.

How would you name the files? car.jpg, car.htm, etc or homecar.jpg or home1.jpg. I usually try to use lowercase on these files as Linux is case sensitive.

Mark Irving
I have a mind like a steel trap; it is rusty and illegal in 47 states

mjames's picture

They have: 2,064 posts

Joined: Dec 1999

Always lower-case for me. For my sports site, I have like /sports/mlb/articles/article69.shtml, /other/extras/headlines, etc.

Brian Farkas's picture

They have: 1,015 posts

Joined: Apr 1999

I would probably name the file car.jpg, etc.- unless there was a different car picture on each page, then maybe I would call it pagename_car.jpg. I would name the html file (if there was only one) index.html- if there were 10 or so, I would probably name the car page car.html, then bicycle.html, etc. This is fine for a small site, meaning probably under 20 pages at max. After that, you're going to want to split the content up into directories, as that is more effective for larger sites.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.