Slash Me Less

Which of the below looks nicer?


The second one? I agree. It looks much more “balanced”.

In a normal static directory layout of a webserver however, these two are not equivalent. /me would refer to a file and /me/ would refer to a directory. In the case that it is indeed a directory, when a webserver encounters a /me, it would recognize that a directory is being refered to, and automatic error correction would make it return the desired result (i.e., the DirectoryIndex of /me/). In such static webmodels, /me/ involves another step, and since this is webserver costly, it’s frowned upon.

Consider a newer (and perhaps more common) scenario now when neither does /me refer to a file nor does /me/ refer to a directory. These are mapped to a request handler that serves assembled output depending on the url context. WordPress, the software that powers this weblog works in this manner. In such an instance, why does it prefer /me/ (as in like this) over /me? If it’s just the aesthetic element, then I can find a counterweight.

/me is one slash less. When you say it out loud to a web-newbie, or when you advertize it in any medium that is not the web, it becomes much more coherent. The extra purposeless slash at the end becomes ludicrous somehow. What do you think?

One response

  1. The convention I use is to end the URLs in a trailing slash if a collection is returned. By collection I mean something that returns a list of URLs, acting almost like a “container” for the URLs.

Leave a Reply

Create a website or blog at