Re: Linking to alternate representation in HTML responses using the Link element

Hello all,
sorry for jumping into the discussion as I'm not really an active  
member of the list, but I'd be happy to share my two cents.

 From a logical point of view, linking to self seems useless. Josť  
has a point here, though: to notify a transcoder you use the link  
alternate and it is proven to work at least with Google's GWT and I  
suppose with most of the others.

My suggestion to the group, then, is that you invite site owners to  
use the link alternate as a way to notify clients and proxies that  
there is also a valid alternative to the content provided and there  
should be a way to notify about handheld, "screen" for desktop  
computers or any other alternative presentation (anyone for TV?  
Nintendo Wii? Sony PSP?). In my view the W3C document should suggest  
to content developers to use the link tag to notify of an alternative  
(or alternate) presentation. The document should suggest to  
developers to use the link alternate that refers to a different  
presentation, i.e. content for handhelds when a "desktop"  
presentation has been provided. Linking to self should be suggested  
when the site is also making content adaptation (such as  
mymobileweb). Which means: "I served you a desktop presentation, but  
I could also provide handheld presentation to this same URL, if I  
knew you are a mobile".

In short, the link alternate that refers to an "alternative  
presentation" should be there when there _is_, in fact, an  
alternative presentation, but not if the current one is the only one.

What we should see in the real world are the following cases:
1. a site has a unique presentation, no content adaptation, no device  
detection: no link alternate
2. a site has two separate URL's or query string parameters, multiple  
presentations based on various rules: one or more link alternate  
tags, one for every alternative presentation, each pointing to a  
different URL (<link rel="alternate" media="handheld" type="[content- 
type]" href="" />) hopefully pointing  
straight to the same content for mobile device or the best effort
3. a site that has a unique URL and multiple presentations based on  
various rules: one or more link alternate tags, one for every  
alternative presentation, each pointing to self

I am not sure what the behaviour will be in case 3, if the "href"  
parameter is empty. A test in the field might be appropriate (for  
both proxies and clients).

On your other topic about query string, I think that the link  
alternate should provide all the required parameters to get the same  
content in an "alternate" format or presentation. If the query string  
is the method chosen by the site owner, then be it.

- Andrea

Il giorno 22/mag/08, alle ore 22:51, Jo Rabin ha scritto:

> OK. Then this now assumes the status of a recommendation that  
> content that is mobile SHOULD contain such a link?
> (Though if I were to be picky I'd wonder how a resource can be an  
> alternative for itself ... )
> Jo
> On 21/05/2008 16:33, Francois Daoust wrote:
>> Replying to myself after further investigations...
>> Dom reminded me that instead of "rev", which is probably correct  
>> but not really ever used in practice, it is actually quite simple  
>> and semantically valid to do the "linking to self" stuff with a  
>> <link> element. The [uri] to set is simply... an empty string!
>> Leading to:
>> <link rel="alternate" media="handheld" type="[content-type]"  
>> href="" />
>> Indeed, the href attribute may be an absolute or a relative link,  
>> and thus the empty string here means "current page", which is  
>> exactly what we need for B) below.
>> Francois.
>> Francois Daoust wrote:
>>> Hi Aaron,
>>> Hi all!
>>> [Aaron, I'm pinging you more specifically on this because it  
>>> seems that Google's transcoding proxy uses this mechanism, so you  
>>> might be able to help with concrete practice here]
>>> We talked a bit about using the "link" element in HTML responses  
>>> in a previous call [1] and a bit on the mailing-list [2] to  
>>> advertise the fact that:
>>>  A) a page _has_ a mobile representation that may be requested
>>>  B) a page _is_ a mobile representation of a resource
>>> The linking mechanism seems simple in theory:
>>>  <link rel="alternate" media="handheld" type="[content-type]"  
>>> href="[uri]" />
>>> as defined in the HTML4.01 spec [3]
>>> In practice, this addresses A, but not B, IMHO, at least not  
>>> directly. The definition of rel="alternate" [4] makes it clear  
>>> that [uri] points to an alternative representation of the  
>>> _document_, from which I understand that "linking to self" should  
>>> not be permitted, at least not in theory. Am I wrong?
>>> If I am, then [uri] can be the document itself, but then the  
>>> questions Jo mentioned in [2] need to be answered to determine  
>>> what constitutes a link to self:
>>> - when the server uses redirection, does [uri] target the  
>>> originally requested URI, the final one, any of them?
>>> - what about query strings? It has to be part of [uri] if one is  
>>> using "?experience=handheld", but aren't resources usually  
>>> identified without the query string?
>>> It occurs to me that we haven't discussed the "reverse linking"  
>>> mechanism, that may help address B. If you have a main page  
>>> "index.html" that contains a link such as:
>>>  <link rel="section" href="section1.html">
>>> then "section1.html" may identify itself as a section of  
>>> "index.html" by defining:
>>>  <link rev="section" href="index.html" />
>>> Given "desktop.html" and "handheld.html", can we define:
>>>  <link rel="alternate" media="handheld" type="application/xhtml 
>>> +xml" href="handheld.html" />
>>> in "desktop.html" and:
>>>  <link rev="alternate" media="handheld" type="application/xhtml 
>>> +xml" href="desktop.html" />
>>> in "handheld.html" to state that "handheld.html" is the  
>>> "handheld" representation of "desktop.html"?
>>> I'd say yes, but I'm not quite sure this is a valid use of the  
>>> "rev" mechanism.
>>> (and I don't quite think that anyone really uses the "rev"  
>>> mechanism at all actually, but that should not be such a problem).
>>> Going back to the guidelines, I'd say:
>>> A) if a _forward_ (rel) link with a "handheld" media attribute is  
>>> encountered, the proxy should redirect the user to the alternate  
>>> representation
>>> B) if a _reverse_ (rev) link with a "handheld" media attribute is  
>>> encountered, then that's it, we've found the handheld version!
>>> [1]
>>> [2] 
>>> 0011.html
>>> [3] 
>>> links.html#h-12.3
>>> [4] 
>>> types.html#type-links

Received on Saturday, 24 May 2008 18:13:40 UTC