Opaque IDs, editable titles in TIL URLs
Today I’d like to highlight something I built with some colleagues that I think is cool: the dynamic paths of Hashrocket’s daily learning site, Today I Learned (TIL). Check out the browser bar here: The URL it contains is: https://til.hashrocket.com/posts/ee0a1bc878-parameters-filtering What do you notice? Here’s my list: After posts/, the path starts with ee0a1bc878 (?) That’s followed by a dash, then the post title in kebab-case (parameters-filtering) When you visit the same URL with an altered kebab-case title (e.g. ee0a1bc878-nope), you get the same page 😵💫 When an admin changes the post’s title (e.g. “Rails Parameters FTW”), the URL changes too(ee0a1bc878-rails-parameters-ftw) 😳 There are some sneaky features in there! Let’s dig into them for a minute. ...