Forum Moderators: mack

Message Too Old, No Replies

Capital letters in the file name - like /Spring_Break.htm

         

gemini18

1:24 am on Jan 12, 2006 (gmt 0)

10+ Year Member



Hi all,

I'm confused about capital letters in URL's. I thought they caused 404 errors, or some major problems.

Personally I like the way /Spring_Break.htm looks with capital letters. In a test site I have them "live" and they work in both Firefox and IE.

Please, tell me the "story" about "/Spring_Break.htm", should it be used or avoided?

Thank you.

RonPK

6:08 pm on Jan 12, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Browsers don't care about capitalization, but many web servers do. On Unix/Linux servers URLs are case sensitive, so a request for spring_break.htm would give a 404 error (file not found), even if Spring_Break.htm would exist.

That means that webmasters would have to be extra careful when creating links to the page.

Another thing to keep in mind is that for the average surfer it is more difficult to type in such an URL.

There also seems to be a general convention not to use uppercase letters in URLs - I hardly ever see any.

txbakers

1:13 pm on Jan 13, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



sometimes I will use the "camel hump" style of url naming if ithelps sort through the files when I'm developing:

springBreak.htm

I rarely if ever use the underscore in URLs

mack

1:58 pm on Jan 13, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



The 404 issue wont happen as long as you use the correct case when you reerance the url.

The exception to this rule is the part up to and including the domain extension

www.example.com is the same as www.ExAmPlE.com

But www.example.com/home.php is not the same as www.example.com/HoMe.php

Mack.

kevinpate

2:48 pm on Jan 13, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If I were going to use capital letters, and I have older pages which do, I'd be more inclined to go with
SpringBreak or Spring-Break.

Tapolyai

2:54 pm on Jan 13, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



To expand on RonPK's comment - *nix & Linux flavored Web servers DO differentiate between upper and lower case letters. Windows Web servers DO NOT, by default.

That is where the problem comes in.

topr8

3:23 pm on Jan 13, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



*nix & Linux flavored Web servers DO differentiate between upper and lower case letters. Windows Web servers DO NOT, by default.

That is where the problem comes in.

yes but surely you could use htaccess to rewrite capitals as lower case and have the files themselves as lower case?

pageoneresults

3:35 pm on Jan 13, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



From the coding side of things, we live in a lowercase world. Why? Because of the exact reasons brought up above. Some servers are set up to be case sensitive, some aren't. Also, if you are validating to an XHTML DTD, case is very important as it is treated differently.

The average web surfer does not know this. They are most likely going to use lower case if typing in a URI.

On a side note, Joe Schmoe surfer is going to type things as they see them. How many times have you talked to an AOL user and they've given you their email address and they are specifying case as they read it to you? ;)

Now, when coding our ASP, we do use upper/lower case to help with clearly identifying functions, etc.