PDA

View Full Version : Good Practice for Naming Files?


alexburi@gmail.
11-19-2007, 04:49 PM
Hi,

On the site I'm building I have a number of pages divided between sections. I have resorted to naming them shorthand to avoid long file names. I am wondering if it is better to name them with full names for reasons such as search engines and so that the file name describes the content.

Here is how I currently have my files on this website (http://www.deborahbrakeley.com/) named:

Academic Background: back_aca.html
Work Experience Background: back_emp.html
Volunteering Background: back_vol.html

Counselling Approaches: couns_app.html
Counselling Articles: couns_art.html


This way in my finder it organizes the files by keeping them in sections and the second part describes each page.

But, is there a better practice to this? Any suggestions? Perhaps using more directories within the main directory?

Thanks,
Alex

JordanW
11-19-2007, 04:54 PM
Well, to be honest, this system is a lot better than the one I use (pretty much random). At least you can easily find files that you need.

It shouldn't make any difference to search engines if you use META tags and such :)


~Jordan

Excavator
11-19-2007, 05:08 PM
Goodmorning alexburi@gmail.,
I've done it before using directories. Very compartmentalized then. Makes it nice to figure out where things are when you come back a year from now.

jcdevelopment
11-19-2007, 05:11 PM
I think that if you can tell what you are working with its the best method, I work for a company that others work on the site so we have to be exact with our files or "Some" People get confused, but that method works the best...

alexburi@gmail.
11-19-2007, 05:46 PM
Thanks for your help everyone.

Is it good to have spaces in your filename, for example:

good practice.html

or is it better to have it named:

good_practice.html?

and what is the purpose of not having any spaces? why use the underscore?

jcdevelopment
11-19-2007, 06:00 PM
no, in most cases you will have problems with spaces, never have them always have an underscore for a space...

Apostropartheid
11-19-2007, 06:02 PM
You shouldn't have spaces in web files.

As far as I know, this is because, in a webaddress, a literal space (| |) cannot be used: it has to be encoded. These are the %20 symbols you sometimes see on a URL.

jcdevelopment
11-19-2007, 06:16 PM
i learned a hard lesson by naming a bunch of pictures with a space between letters on a file.. It took me 2 weeks to figure out what stupid mistake i had made..(thats when i first started developing of course)

Apostropartheid
11-19-2007, 06:18 PM
i learned a hard lesson by naming a bunch of pictures with a space between letters on a file.. It took me 2 weeks to figure out what stupid mistake i had made..(thats when i first started developing of course)

Lol, awwh. *sympathetic look* The person that "taught" me was shouting at me from step one, so I didn't commit such an...atrocity.

But anyway, I think IE can do it, from vague memory.

Fang
11-19-2007, 06:21 PM
http://www.w3.org/QA/Tips/uri-choose

Donkey
11-20-2007, 02:45 PM
A couple of years ago I remember reading a thread about this on another forum. The consensus there was that a dash (or hyphen) is better than an underscore for SEO purposes because the dash separates the words better and enables the search bot to identify keywords used in page and image file names.

Is that now no longer valid?