W3C home > Mailing lists > Public > public-html@w3.org > August 2007

Re: review of content type rules by IETF/HTTP community

From: Maciej Stachowiak <mjs@apple.com>
Date: Mon, 20 Aug 2007 12:00:33 -0700
Cc: Lachlan Hunt <lachlan.hunt@lachy.id.au>, "public-html@w3.org WG" <public-html@w3.org>
Message-Id: <8D7CB2BD-B11D-480A-9677-544D7F45BC09@apple.com>
To: Sam Ruby <rubys@us.ibm.com>


On Aug 20, 2007, at 11:39 AM, Sam Ruby wrote:

> Maciej Stachowiak wrote:
>> On Aug 20, 2007, at 10:14 AM, Sam Ruby wrote:
>>>
>>> Again, I think you are missing my point.
>>>
>>> Random Joe user puts a feed up, and the host serves it as text/ 
>>> html.  It happens more often than you might think[1].  The current  
>>> behavior of IE7 and Firefox and others is to sniff the content and  
>>> display it as a feed.   I have no problem with that.
>>>
>>> Meanwhile, I put a test case up, and serve it intentionally as  
>>> application/xml.
>>>
>>> Given these two diverse use cases, how can I configure my own  
>>> browser to display the content "in the most appropriate way for  
>>> me" if there is no way for me to distinguish these two cases?
>>>
>>> All I am asking for is for an architected way to serve selected  
>>> content in a way that "opts out" of content sniffing for that  
>>> specific request, and have my wishes respected in a large  
>>> percentage of the browsers deployed a decade from now.
>> I think Lachlan's point was something like this:
>> Handling application/xml by rendering the content based on the XML  
>> language used is expected and appropriate handling for that MIME  
>> type. It is not a form of content sniffing in the same sense as  
>> treating text/plain as text/html would be.
>> So while it may be valuable to have a way to say "this is really  
>> the content type, please don't sniff", your example does not make a  
>> very strong case for it, since browsers are in their rights to do  
>> custom rendering of any XML content type based on the namespaces  
>> used in the contents.
>
> If I changed my content type to text/plain, would that change your  
> answer?  I would gladly change my Content-type to text/plain if only  
> I could get browsers to respect that.  Gladly.  But they don't.

It would change my answer if the question is about a way to say "this  
is really the content type". In that case my only doubt would be about  
transition issues. If most browsers don't respect a hypothetical  
Really-The-Content-Type header at present, then there is a risk that  
content would appear which depends on it not being respected. But  
perhaps it would be such an expert setting that this risk is lower  
than for the original Content-Type header.

> So far, the only advice I have received is to add 512 or more bytes  
> of text to each and every test case, and watch the spec for further  
> changes.
>
> For further reference:
>
> http://diveintomark.org/archives/2004/08/13/safari-content-sniffing

Safari's content sniffing will probably end up being less aggressive,  
not more, when we start following the HTML5 rules.

Regards,
Maciej
Received on Monday, 20 August 2007 19:00:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:04 GMT