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

Boris Zbarsky bzbarsky at MIT.EDU
Tue Aug 31 06:40:18 PDT 2010

On 8/31/10 3:36 AM, Ian Hickson wrote:
>> You might say "Hey, but aren't you content sniffing then to find the
>> codecs" and you'd be right. But in this case we're respecting the MIME
>> type sent by the server - it tells the browser to whatever level of
>> detail it wants (including codecs if needed) what type it is sending. If
>> the server sends 'text/plain' or 'video/x-matroska' I wouldn't expect a
>> browsers to sniff it for Ogg content.
> The Microsoft guys responded to my suggestion that they might want to
> implement something like this with "what's the benefit of doing that?".

One obvious benefit is that videos with the wrong type will not work, 
and hence videos will be sent with the right type.

If the question is what the benefits of that are, one is that the "view 
video in new window" context menu option actually works.

Another benefit is that you can send someone the link to the video, 
instead of the embedding page, and it will work.

Another is that when you save the video to disk the browser will fix up 
the extension correctly, if needed.

Basically, getting the types right means that use of the video outside 
the <video> tag won't be broken.  Inside the <video> tag there's 
probably no difference.

> It seems that sniffing is context-sensitive.

Yes, but one issue is that we really do want resources to be usable 
outside the context the page happens to want to put them in.

The ship has sailed on <img>, clearly, and is working on sailing on 
<video>, but I feel that the behavior IE and Chrome are implementing 
here is highly detrimental to the web.  Not that they care much.

> Sadly, the boat has sailed for text/html and XML at this point, but for
> binary types, and for contexts where text/plain isn't a contender, why
> bother doing anything but sniff?

See above.  As long as some contexts are sniffing and some are not, we 
have a problem.  If it were all-sniff (with the same algorithm across 
the board!) or all-not-sniff, we might be ok.


More information about the whatwg mailing list