[whatwg] <video> application/octet-stream

Chris Double chris.double at double.co.nz
Wed Jul 21 07:07:50 PDT 2010

On Thu, Jul 22, 2010 at 1:59 AM, Mike Shaver <mike.shaver at gmail.com> wrote:
> That's what I expected, so I guess I don't understand what the "how
> much are you willing to sniff?" question is about.

When content sniffing are we ignoring the mime type served by the
server and always sniffing? If so then incorrectly configured servers
can result in more downloaded data due to having to read the data
looking for a valid video. For example:

  <source src='foo.ogg'>
  <source src='foo.mkv'>

If the web browser doesn't support Ogg but does support matroska, and
the server sends the video/ogg content type,  the browser can stop and
go to the next source after downloading very little data.

If the web browser is expected to ignore the mime type and content
sniff it must see if 'foo.ogg' is a matroska file. According to the
matroska spec arbitary ASCII data can be placed before the EBML
identifier. This means reading a possible large amount of data (even
the entire file) before being able to say that it's not a matroska

That type of scenario is what I was getting at about how much of the
file should be read before giving up.


More information about the whatwg mailing list