When Good URLs Go Bad

Fanfiction.net’s new category search pages show the how just how not to implement “friendly” URLS.

To provide a little context, they used to look like this:

http://www.fanfiction.net/list.php?c=224&cr=0&ch=0&l=1&sch=1&g=0&l=1&s=1&len=0&p=1

The new version looks like this:

http://www.fanfiction.net/l/224/4/0/1/1/0/0/1/1/

It’s such a huge step backwards that I don’t even know where to start complaining. It’s at least as daunting to look at as the old URL, but it’s less human-readable and less intuitive. It’d be understandable if it offered some major benefit, but there’s none that I can see.

These new URLs are less human-readable, since parameters now have semantic value only by virtue of position. With the key-value pairs it was possible to learn that “len=10″ meant “length greater than 10 (x1000) words”; the new equivalent is “length greater than the fourth fake directory from the end (x1000) words”.

They’re counterintuitive, because they’re not hackable. Friendly URLs should let you traverse upwards, so that http://example.com/2004/05/ is an archive for May 2004, and stripping the 05/ gives you http://example.com/2004/, an archive for 2004 as a whole. Remove anything from these fanfiction.net URLs and you get an error message, even though the cateogory ID is the only parameter actually required by the script. Not that making them hackable would be that useful in any case, because they’re not hierarchical — they’re flat structures playing dress-up.

It’s true that they’re future-proofed a bit, because there’s no .php cruft in the address, but so what? http://fanfiction.net/l/?c=244 offers the same, and it’s easier on the brain. Google uses /search?q=...; it’s not exactly a low profile option.

These links might be more attractive to search engines, but it’s probably a moot point. At the very least, the use of JavaScript to navigate between search result pages make it extremely unlikely that a spider will index more than the first.

They’re not permalinks, so future-proofing isn’t exactly urgent. Even if it was, it’s not on fanfiction.net’s agenda, given that they broke all of their story permalinks when they changed over from storyid=8239 to /s/8239/1/.

The real kicker is that the filter form now requires JavaScript to function. Because these new URLs violate the way form submissions work on the web, the new action is this monstrosity:

var temp = document.myform; 
self.location = '/l/224/' + 
temp.censorid.options[temp.censorid.selectedIndex].value + '/' + 
temp.genreid.options[temp.genreid.selectedIndex].value + '/' + 
temp.languageid.options[temp.languageid.selectedIndex].value + '/' + 
temp.sortid.options[temp.sortid.selectedIndex].value + '/' + 
temp.len.options[temp.len.selectedIndex].value + '/' + 
temp.characterid.options[temp.characterid.selectedIndex].value + '/' + 
temp.subcharacterid.options[temp.subcharacterid.selectedIndex].value + '/1/';"

It’s madness.

   
This entry was posted on Friday, February 18th, 2005, in the categories “”, “JavaScript” and “usability”.

Leave a Reply