Web Development – Should Title Case Be Used in URLs?

coding-standardsconventionsweb-development

We are currently deciding on a consistent naming convention across a site with multiple web applications. Historically, I've been an advocate of the 'lowercase all the letters!' when creating URLs:

http://example.com/mysystem/account/view/1551

However, within the last year or two, specifically since I began using ASP.NET MVC & had more dealings with REST based URLs, I've become a fan of capitalizing the first letter of each section/word within the URL as it makes it easier to read (imho).

http://example.com/MySystem/Account/View/1551

We're not in a situation where people need to read or be able to understand the URLs, so that's not a driver per se. The main thing we are after is a consistent approach that is rational and makes sense.

Are there any standards that declare it good to do one way or another, or issues that we may run into on (at least realistically modern) setups that would choose a preference over another? What is the general consensus for this debate currently?

Best Answer

As the choice is mainly cosmetic (ie, most systems don't differentiate between upper and lower case, and users certainly don't), then I'd suggest just going with whichever makes you happy. Consistency within the application is the key, not the manner you choose.

As you're using ASP.Net, I'd recommend going with the PascalCase approach - as that is what tends to exist within the Microsoft framework (system libraries, etc.) But there are no "best practices" other than being consistent.

Most browsers do a fairly good job of hiding the URL from the user, to such an extent that a great many people who have google as their home page, will then search for facebook and click on it - rather than entering the facebook url in their browser.

Related Topic