Skip to content

Scope and structure of mimesniff #152

@GPHemsley

Description

@GPHemsley

@annevk from #70:

There's two places where we have a need for sniffing in the web platform as I understand it:

  1. Navigation. Here the point is to determine whether it's HTML, plain text, media, PDF, or a download. For media there is of course some decision about what decoder to use at some point, but the most important decision here is whether it will be send to the decoder at all.

  2. Individual endpoints. Here it's mostly about documenting what decoders accept and should reject. We don't really care whether an implementation uses a single decoder for all of media or has separate pipelines for various media formats. That's indeed the realm of other specifications that define what a byte stream results in. (And note that often there is a step before invoking this in the individual endpoints where the MIME type is checked first. E.g., image/svg+xml is handled in a special manner in the image endpoint pipeline.)

And there will be a third: https://github.com/annevk/orb.

The original purpose of mimesniff was the first point, but many authors have been using it for the second point.

We should discuss whether the second point is within the scope of mimesniff and, if so, how to structure the spec to avoid conflating the two (or three).

Metadata

Metadata

Assignees

No one assigned

    Labels

    metaChanges to the ecosystem around the standard, not its contents

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions