Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The maximum url length is typically quite long.

Another thing is that you don’t necessarily need to encode uuids canonically. They are just u128’s. It’s relatively straightforward to find a url friendly string representation that is shorter.



> It’s relatively straightforward to find a url friendly string representation that is shorter.

Are we talking about shortening the whole URL or shortening specific UUIDs? If the latter then I imagine one would still need to keep track of the mapping UUID <-> shorten version, somewhere, right? If so, why not just add yet another field/column for an old good numeric integer that can be used for filtering? Would that work?


I think the point is for URLs you can consistently represent the 128 bits of UUIDs with shorter strings by using a higher base. I.e. more characters.

So a nonstandard but isomorphic shorter string representation.


You could simply base32, base36 or base64 encode the UUID's (as an example).

Other than that; in IE6 times URL's had a limitation of 1K or 4K or something around that lenght IIRC, so unless you're using dozens of UUID's in a URL this hasn't been a problem for ages.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: