[wp-hackers] Why URL in GUID?
Sam Angove
sam at rephrase.net
Tue Oct 3 01:27:25 GMT 2006
On 10/3/06, Paul Menard <codehooligans at codehooligans.com> wrote:
>
> The only I have is if this value must be unique, why is it not a
> unique key in the database. More specific, why is it not 'the' unique
> key?
It's not *just* a unique key. It's used in Atom feeds for the `id`
element, for example, which is required by the spec to be a valid IRI.
In Atom 0.3 it was required to be a URI. That limits the format fairly
drastically.
Anyone looking into it should read this article by Mark Pilgrim: [1]
[1]: http://diveintomark.org/archives/2004/05/28/howto-atom-id
He recommends using tag URIs [2]. Some examples:
tag:timothy at hpl.hp.com,2001:web/externalHome
tag:my-ids.com,2001-09-15:TimKindberg:presentations:UBath2004-05-19
tag:blogger.com,1999:blog-555
tag:diveintomark.org,2004-05-27:/archives/2004/05/27/howto-atom-linkblog
They're still readable and informative, but aren't going to be
mistaken for HTTP URLs. I don't think any of the other options are as
good.
[2]: http://www.ietf.org/rfc/rfc4151.txt
More information about the wp-hackers
mailing list