3 ms·
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 relati
by dgb23 3y ago
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.
- danwee 3y ago> 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?
- Nevermark 3y agoI 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.
- RobIII 3y agoYou 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.