[whatwg] Video with MIME type application/octet-stream

On 8/31/10 3:59 PM, Aryeh Gregor wrote:
> On Tue, Aug 31, 2010 at 10:35 AM, Boris Zbarsky<bzbarsky at mit.edu>  wrote:
>> You can't sniff in a toplevel browser window.  Not the same way that people
>> are sniffing in<video>.  It would break the web.
>
> How so?  For the sake of argument, suppose you sniff only for known
> binary video/audio types, and fall back to existing behavior if the
> type isn't one of those (e.g., not video or audio).  Do people do
> things like link to MP3 files with incorrect MIME types and no
> Content-Disposition, and expect them to download?

The issue would be someone linking to text or HTML or a binary blob that 
happens to have some bits at the beginning that look like an audio/video 
types and expecting them to be rendered respectivel as text or HTML or 
be downloaded.

> I don't see how sniffing vs. using MIME type makes a compatibility
> difference here, since media support in browsers is so new -- surely
> whatever bad thing happens, sniffing will make it happen more often,
> at worst.

The big danger with sniffing, as always, is that the server will think 
one thing will happen and suddenly the browser will do something totally 
different.

> What do Chrome and IE do here?

Good question.

-Boris

Received on Tuesday, 31 August 2010 13:13:57 UTC