I have a (very minor and polite) disagreement with Matt Gemmel's argument against dates in URLs.
Before I start, let me be very clear; your blog = your rules. If you want to write your URLs as a series of Emoji or in Klingon - go right ahead. There really is no such thing as "best practice" - only personal preference and observed behaviour.
Here's my case for keeping dates in URLs.
URLs are designed to provide information to humans and computers. That's why we don't just use IP addresses and binary representation of paths.
- The "scheme" (http, https, ftp, etc) tells me whether my connection is secure, and what program is likely to try to open the link.
- The domain "example.com" tells me the destination. I can decide whether I consider it to be trustworthy or not.
- The path "/2015/blog-urls-explained.pdf" gives me further semantic information about the destination. Is it recent information? what's the page about? Is it a web page or a file?
All of which lead to my decision as to whether I visit the link or not.
Matt's arguments are mostly aesthetic.
They’re visually ugly. Strings of numbers aren’t nice to look at. They look like they’re made for machines.
Well, that's a matter of opinion. I can't find any evidence that people are somehow offended or alienated by numbers. The semantic information is useful for humans - people can quickly see that a post about the iPhone is from 2011 and is probably obsolete.
They’re unnecessarily lengthy. They’re exactly eleven characters too long, in fact.
Personally, I prefer Year/Month format - but I rarely write each day. For a site which has to publish multiple times per day, it may make sense to give the reader some pre-warning as to how fresh the content is.
Why is brevity a virtue? What is the perfect length? What are the consequences of being unnecessarily verbose? The only explanation is the next point:
They push the post’s title off to the right, maybe partially obscuring it in the address bar of the visitor’s browser (or their bookmarks menu, or history list).
That's stretching it a bit! If you're truly worried that obscuring the address is a concern, get a shorter domain!
The argument here is that the last few characters of a URL have much greater semantic importance than the date of publication. I can't agree. In the future we might be browsing on augmented reality goggles which give us a 360° field of view. Complaining that small phones might be slightly disadvantaged seems like the sort of "pixel perfect" design the web is meant to eschew.
Worrying about the length of the URL just leads you to waste time crafting a URL which is exactly the right length for one particular device. Or should you worry about how the URL will display on a Smart Watch?
The page itself has the date of the post on it anyway. In the few cases where it doesn’t, that’s a deliberate design choice, and you’re not meant to be focusing on it.
I agree, your posts should probably have a date on them. But they also have a title, so why not remove that from the URL as well?
If your posts really are designed to stand the test of time and remain an immutable opinion - you may be confusing yourself with an infallible deity. For most bloggers, posts are a product of their time. Users probably do care that your opinions have evolved. IF I write about the War in Afghanistan, I want it to be fairly obvious which of the many wars I am talking about. I think the URL helps - as does the date on the page.
In most cases, you don’t care about the date. Right now, a tiny subset of humans (technical people, who think of code examples or software tutorials when they read the phrase “blog post”) are going to argue that the date does matter. They are wrong. Any article with time-sensitive information will either mention its vintage explicitly, or is by definition poorly constructed.
Hurrah! I'm in a subset of geeks! Luckily, I am right.
Humans are notoriously bad at thinking in advance. Most of us have neither the time nor the inclination to make our text adhere to the Platonic Ideal of a blog post. Should I mention that my review of a book is the 2013 edition? Probably. But if I forget, or simply don't consider the consequences, there's a handy guide for the next human in the shape of the URL data.
Dates in URLs help save us from our human failings.
Taken to its logical conclusion, Matt's idea (human-readable semantic information is ugly and redundant) ends with the proposal put forward by my friend Tom Morris whose posts URLs are in the format "/post/1234".
not every post can be adequately summarised with a bunch of ASCII characters with hyphens between them. What about just a photo post, without a title? Even my “formatted titles” are a bit of a bad hack I might turn off.
Other than SEO, there’s no particularly good reason why people should prefer a long URL with the title in than one that just has a unique identifier. The title is also not immutable on posts. That is, I can change a title, or even remove a title, after publication. Should I change the URLs? Well, no. URLs, once announced, should stay the same. Okay then, I’ll have URLs that are inaccurate.
A plague on both your houses!
Humans are fragile and fallible. We need every bit of help we can to navigate our way through life. A fashionable choice now can have unintended consequences in the future. We should design all aspects of our sites - from URL to content - to withstand changes in devices, formats, browsers, and people.
Would a URL with a date in have helped prevent confusion over Tony Hart's date of death?
Such an inspiration to me and so many others 🙁 Tony Hart, artist and inspiration for children, dies at 83 http://t.co/MKHKYqJwDZ
— Richard Aston (@AstonFaceon) February 15, 2015
Probably not. We're all just monkeys letting squiggles of black and white emotionally manipulate our brains. Or, to put it crudely :
Ever realised how fucking surreal reading a book actually is? You stare at marked slices of tree for hours on end, hallucinating vividly
— Katie Oldham (@KatieOldham) December 9, 2014