Re: [dxwg] changing Link header rel="self" to rel="default" (#1134)

Here is the definition for *self*:

> Conveys an identifier for the link's context. 
(https://www.iana.org/assignments/link-relations/link-relations.xhtml)

Or, in extended form, from the Atom spec:

> The value "self" signifies that the IRI in the value of the href attribute identifies a resource equivalent to the containing element.

with the full normative instruction:

> atom:feed elements SHOULD contain one atom:link element with a rel attribute value of "self".  This is the preferred URI for retrieving Atom Feed Documents representing this Atom feed.
(https://tools.ietf.org/html/rfc4287)

So, whether used in an Atom `<link>` element or in an HTTP header `Link`, the intention of `self` is not as we have used it. The original Atom intention was all about how to get the current resource's feed URI but that's been bastardised, like many other Atom concepts, for generic HTTP use. It's still, however, not what we want as all of the `Link` headers we provide may refer to the same context (URI), just with different `type` or `profile` properties.

How about `rel="canonical"`?

The definition for `canonical` reads:

> Designates the preferred version of a resource (the IRI and its contents).
(https://www.iana.org/assignments/link-relations/link-relations.xhtml)

looking into the spec defining it though, it's extended form reads:

> "canonical" can be described informally as the author's preferred version of a resource.  More formally, the canonical link relation specifies the preferred IRI from a set of resources that return the context IRI's content in duplicated form.
(https://tools.ietf.org/html/rfc6596)

To me this reads as much closer to what we want! It's still a little off (the "...IRI from a set of resources..." bit indicates the intention is to create `Link`s with differing target URIs, rather than the same target URIs but with differing Target Attributes) but the result is fine: this (the "canonical") `Link` header will give you the *author's preferred version of a resource* which I think can reasonably be interpreted as the default.


If you are both OK with this, I will push an updating commit to this PR to replace `rel="self"` with `rel="canonical"` throughout the document and not have to register anything.

-- 
GitHub Notification of comment by nicholascar
Please view or discuss this issue at https://github.com/w3c/dxwg/pull/1134#issuecomment-554965991 using your GitHub account

Received on Monday, 18 November 2019 11:01:28 UTC