encodeTitle and decodeTitle) based on encodeURIComponent that fully encode all characters in a title, convert spaces to hyphens, and delimit words with "-"s. They are inverses, i.e. title == decodeTitle(encodeTitle(title))For example a title like I ♠ my little "cat-dog"? gets encoded as I--%E2%99%A0--my-little--%22-cat-dog-%22%3F--3q72j18. For this example note in particular that "cat-dog" remains as a unit in the encoding without extra cruft separating the words.
encodeURLComponent would seem to indicate that it would be safe to encode it as Web-2.0-...-The-Machine-is-Us-%2F-ing-Us. encodeURIComponent and may serve as a starting point.
What is it?
I'm basically moving from the format of:
http://ask.metafilter.com/mefi/12345
and instead to something like this:
http://ask.metafilter.com/12345/How-to-find-a-lost-dog-in-NYC
The old style URLs will still work, as both are loading the very same file.
Why do this?
There are two reasons. The major one is that I'm constantly finding people on other blogs or even within the MeFi universe say stuff like "I love the answers here" or "This is a great thread" and when you mouse over the links, you don't get any information about it. They could be about anything at all. I noticed that when I hovered over links to blogposts and digg and similar sites, they often stuffed the title into the URL so it was often helpful to figure out what lay ahead on links that were not described.
The second reason is so that questions in Ask MetaFilter will show up in Google more often. Now, that's not an entirely selfish decision and I'm not trying to game google, but when you search for a full question's text on Google, An ask mefi post may show up in the top 50-100 spots but rarely closer than that. I realized last week when a dishwasher died at my house, when I did searches for what dishwasher to buy, I got nothing but pointless product pages for the first 100 results when a search, but when I searched for the term diswasher at Ask MeFi, I got a really good answer. We have 40,000+ questions on every subject under the sun now, so we might as well help others out with all this information.
How's it going to work? What about X?
The structure of links will be whatever.metafilter.com/-id number-/-title of post-, and since the ID is within the URL, no matter how URLs get cut off in email or other devices, the proper post will show up. Old URLs will work forever as well, but references throughout the site will eventually all follow the new format. And while I was going to make sure that full URLs would be less than 80 characters in length to work best with text-wrapping on email apps, I noticed that digg and millions of wordpress and vox blogs all put the full titles in the URL, length be damned. And since cut-off URLs will still work, even if your email app does cut it off (try it) the proper page will come up. All punctuation is removed and spaces are replaced with dashes, making highly readable URLs. It should be a smooth, harmless switch over since the original URLs will continue to work.
Some examples?
Here's a list of 50 questions from today on Ask MeFi. The URL structure looks like the following:
/56046/Click-Click-Boom
/56045/Help-me-move-my-playlist-across-the-file-structure-divide
/56044/How-can-I-sell-data-on-demand
/56043/Why-do-companies-wait-so-long-before-giving-out-W2s
/56042/Can-you-get-New-Mexican-food-in-Phoenix
/56026/How-to-handle-applying-for-work-8-hours-away-from-your-current-residence
/56041/How-to-find-a-job-in-AUSNZ-from-Canada
/56040/Best-brainstorming-practices
/56039/CDDVD-drive-kaput
/56038/Best-lens-for-K10D-camera
/56037/Making-two-columns-work-in-MS-Word-shouldnt-be-this-hard
/56036/Home-Network-Expansion
/56035/Webform-for-item-tracking
/56034/Breakfast-in-Miami
/56033/Give-me-advice-on-settling-a-bodily-injury-claim-for-a-car-accident
/56032/Help-me-find-examples-for-my-exam
/56031/What-works-of-fiction-are-most-firmly-embedded-in-the-American-cultural-consciousness
/56030/Does-anyone-know-the-lyrics-to-Words-by-Sangie-Davis-Lee-Perry
/56029/Setting-up-a-think-tank
/56028/Is-it-fishnappingor-MURDER
/56027/Client-Server-Database
/56025/How-to-cancel-a-gift-subscription-and-still-get-the-cash
/56024/Print-Audit-alternatives
/56023/How-warm-should-my-landlord-keep-my-apartment
/56022/Help-Me-Write-My-Cheese
/56021/MS-Office-Small-Business-Accounting-Help
/56020/Are-teachers-tougher-than-students
/56011/sentinal-pile-should-i-worry
/56019/Overall-costs-of-thrombosis
/56018/Cheapo-ethnic-jewellery-in-the-UK
/56017/Counselortherapist-in-the-Boston-area-MBTAaccessible-who-is-good-at-handling-career-and-life-goal-questions
/56016/What-films-should-I-watch-to-better-appreciate-Kill-Bill
/56015/Please-help-me-find-a-replacement-for-my-HP-Jornada-minilaptop
/56014/Firefox-extension-to-control-HTML-forms
/56013/Mapping-drive-to-MSSQL-table
/56012/Unique-reception-venue-in-Sioux-Falls
/56010/Insurance-PreExisting-Condition-Woes
/56009/A-banana-would-have-made-it-perfect
/56008/Where-can-I-buy-Napalese-jewelry-outside-Nepal
/56007/Should-I-pursue-him
There are joke answers to be sure, but the vast majority are really obvious and helpful. An undescribed link to them reveals what they'll likely be about.
posted by mathowie (staff) at 2:09 PM on February 1, 2007