Re: recommend Accept in preference to User-Agent to determine formats

On Tue, 12 Dec 2006 20:00:16 +0530, Dan Connolly <connolly@w3.org> wrote:

> On Dec 12, 2006, at 12:05 AM, Charles McCathieNevile wrote:
>> On Wed, 29 Nov 2006 14:59:01 +0530, Dan Connolly <connolly@w3.org>  
>> wrote:
>>
>>>
>>> Regarding...
>>>
>>> "To determine what formats a device supports, Web sites may use any
>>> combination of device profile information such as the HTTP User-Agent
>>> header, HTTP Accept headers and UAProf."
>>>  -- http://www.w3.org/TR/mobile-bp/ (2 November 2006)
>>>
>>> The HTTP accept header is specifically designed for this purpose;
>>> web sites SHOULD use it.
>>
>> The problem is, given the cost (in terms of battery consumption,  
>> latency, bandwidth, ...) of sending data from a device, it makes no  
>> sense at all for reasonably capable devices to be sending the 1kb or so  
>> of data that would make this feasible.
>
> 1kb? where do you get that? I don't see anything in the draft or  
> elsewhere that leads to that conclusion.

The list of formats that are accepted is often significantly longer than  
the list of formats that are sent in an accept header. We get requests  
 from people to keep adding things, and we simply say no - because whatever  
gets standardised, we are not going to keep adding to our accept header.

svg (and image/svg-xml for compatibility), text/xml, application/xml, wml,  
xhtml-mp, xhtml, html, atom, rss, gif/png/jpg/bmp, css, xslt, ecmascript,  
text/plain, application/x-opera-widget and a couple of other extension  
mechanisms, ...

Luckily we rejected the request of the CDF group to add further to the  
list of things that we won't send. And since we don't currently support  
Xforms, RDF, MathML, except with an extension, we don't add those either.  
Nor do we add things that we pass off to plugins.

> And what alternative takes significantly less bandwidth?

UAProf (and analagous mechanisms that use something other than what is  
sent directly in the request such as the more complete WURFL). The issue  
is not just bandwidth, but specifically the cost of sending data from a  
mobile device. As a note, we have only ever got one request that I know of  
about what Opera mini (which is fundamentally working as a desktop  
browser) sends in its Accept header, and that was to *remove* stuff.

> The way the draft currently reads re-specifies HTTP. I suggest that's  
> beyond your charter.

I believe we are not re-specifying it at all, we are just pointing out  
that if you rely on it being implemented, you might as well be whistling  
dixie, and explain what happens in the real world.

>>> It's OK to say that they MAY use other stuff, but it doesn't
>>> make sense to say that User-Agent is just as good as Accept
>>> for figuring out what format the client wants.
>>
>> In practical terms it does. The standard might say otherwise, but  
>> unfortunately there are real problems engendered in actually  
>> implementing it, which is why browsers don't
>
> Which browsers don't? All browsers I know of send reasonable Accept:  
> headers.

reasonable != complete

So if you want to know what is happening even on the desktop, relying on  
accept headers means you lose out. In orderto make things work, you SHOULD  
look around a bit wider.

cheers

Chaals

-- 
   Charles McCathieNevile, Opera Software: Standards Group
   hablo español  -  je parle français  -  jeg lærer norsk
chaals@opera.com          Try Opera 9 now! http://opera.com

Received on Wednesday, 13 December 2006 07:10:12 UTC