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

On 12/8/10 8:19 PM, Ian Hickson 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?

People actually rely on the not-sniffing behavior of UAs in actual 
browser windows in some cases.  For example, application/octet-stream at 
toplevel is somewhat commonly used to force downloads without a 
corresponding Content-Disposition header (poor practice, but support for 
Content-Disposition hasn't been historically great either).

> (Note that the
> spec as it stands takes a compromise position: the content is only
> accepted if the Content-Type and type="" values are supported types (if
> present) and the content sniffs as a supported type, but nothing in the
> spec checks that all three values are the same.)

Ah, I see.  So similar to the way <img> is handled...

I can't quite decide whether this is the best of both worlds, or the 
worst.  ;)

It certainly makes it simpler to implement video by delegating to 
QuickTime or the like, though I suspect such an implementation would 
also end up sniffing types the UA doesn't necessarily claim to 
support.... so maybe it's not simpler after all.

-Boris

Received on Wednesday, 8 December 2010 22:04:55 UTC