||[Jan. 5th, 2004|01:12 am]
Whenever I see a stupid URL like:|
I wonder: Are they actually using a huge VARCHAR to store that digest string as their primary key? And everywhere they need that primary key? What is that a digest of? The article text? A unique integer?
If anything, I hope they map that digest to an integer, and use the integer everywhere internally. But why use such an ugly URL, then? To prevent enumeration? Just add some random junk chars that are tied to the integer, then:
At least it'd be shorter.
Anybody familiar with any of the code for the different content management systems which use MD5 URLs?
(I tried to sleep and failed.)
I previously thought it was related to encryption and never bothered much, but your question made me google.http://www.truerwords.net/1740
- the threads below discuss this to some extent.
I think it's mostly to ensure the uniqueness of the digest, i don't think anyone would spend much time to clean it up and make the url look aesthetically pleasing or even comprehensible for users, simply because of the sheer volume message threads can generate. The cleaner url that maps to the long one would still have to be unique, and that's just extra effort. Although the var is called article, I suspect it's managed much like a message post. If that made any sense.
Um, Hi. I just started lurking in the background reading your LJ. :)
2004-01-05 04:18 pm (UTC)
But I argue it's a shitty implementation, as well as a shitty interface.
Looks like someone who wanted a key and didn't understand how to use sequences. :)
2004-01-05 10:55 am (UTC)
This might be slightly off-topic, but tinyurl.com may be of interest. Feed it a huge url (hurl?), and it spits out a redirect page with a very short url.http://tinyurl.com/#example
I've used it once or twice.
2004-01-05 05:27 pm (UTC)
This is not a dig at tinyurl.com but it's not quite as cool as I initially thought.
I initially thought that the URL you get out of tinyurl.com was some sort of hash of the original long URL. However, it appears to be just some database reference and not that I care so very much but it could certainly lead to privacy concerns.
2004-01-05 01:49 pm (UTC)
I just wish they'd use a sensible URL for the article involving the article name, such as:
However, I guess for user-submitted articles they can't let users pick the URLs in a global namespace like that.
Sometimes it's a mixture of session tracking and page reference into one string. Clever in a way, but produces sucky URLs. You run into it a lot on certain forums, although most just stick to keeping session and target separate.
What does "junk chars that are died to the integer" mean.
I've never heard the term died used like that.
2004-01-05 04:19 pm (UTC)
eh, "tied". it was late.