W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2009

[whatwg] First or last Content-Type header?

From: Julian Reschke <julian.reschke@gmx.de>
Date: Tue, 02 Jun 2009 10:31:00 +0200
Message-ID: <4A24E344.8040209@gmx.de>
Adam Barth wrote:
> Sure.  For the sake of discussion, let's say IE6 and IE7.  Basically,
> if the Content-Type header contains a value IE knows about, then IE
> pretty much ignores the value and engages its sniffing algorithm.  So,
> for example, if a response has:
> 
> Content-Type: text/html
> Content-Type: image/gif
> 
> and is really a GIF.  IE will show the image correctly because it will
> see the text/html type, ignore it, and then sniff GIF from the
> content.  By contrast, Firefox and Chrome will see the type image/gif
> type and show the image correctly.  This is quite likely to occur on
> the web because it works in every browser.
> 
> Now, consider the reverse:
> 
> Content-Type: image/gif
> Content-Type: text/html
> 
> In this case, IE renders the image correctly, but Firefox and Chrome
> don't show the image.  This is less likely to occur on the web because
> it doesn't work in Firefox (e.g., >20% of the market).

Thanks!

BR, Julian
Received on Tuesday, 2 June 2009 01:31:00 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:12 UTC