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

On Wed, 2006-12-13 at 12:39 +0530, Charles McCathieNevile wrote:
> 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.

As you point out below, to use the HTTP accept header reasonably
is not to exhaustively list all formats the client handles; it
doesn't take 1KB.

> 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.

Did you remove the Accept header altogether? If not, you're still
using it.

> > 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.

The words in the draft are:

"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)

That makes claims about how HTTP works other than just
importing info from the HTTP spec; it re-specifies HTTP.
In particular, it says that User-Agent and Accept are
equally relevant to the formats the device supports.
Please change it.

> >>> 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.

I find Accept headers acceptably reliable in lots of
interesting cases.

>  In orderto make things work, you SHOULD  
> look around a bit wider.
> 
> cheers
> 
> Chaals
> 
-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/
D3C2 887B 0F92 6005 C541  0875 0F91 96DE 6E52 C29E

Received on Monday, 18 December 2006 16:44:53 UTC