News for hackers. Stuff that matters.
Re:Things you should do now (2011) by nostrademons on Friday February 19, 2021 @01:32PM (#26196275)
This is terrible from a UX perspective though. Nobody wants 36 random digits in their URLs.

Assuming you can stomach the latency hit, the best solution is usually a lookup table where you take all the friendly URL keys and map them to internal identifiers. So if you're making a multiplayer game site and want to create a page where folks can find their friends, then you might support yourgame.net/user/username, yourgame.net/character/charactername, yourgame.net/steam/steamlogin, yourgame.net/xbox/xboxgamertag, etc. Internally you have an inverted index that maps [type, string] to the internal ID for the player, then proceed normally.

There are no comments on this comment yet.