Is there a "default" MIME type?

65,857

The least specific official MIME type is application/octet-stream. Without any additional information, it says "here is a bunch of bytes, hopefully there is an application over on your end which knows what to do with them". Sometimes there is a file name which helps convey to the recipient what to do with the data.

"unknown" doesn't really add anything over this, except to confuse clients who don't support random unofficial MIME types. Ditto for application/binary; it's just a non-standard way of restating "octet-stream".

This is the answer to "What can I put in the Content-Type: header if I can't find an existing content type which adequately describes my data?" which is how I have interpreted this question. The proposed duplicate Unknown file type MIME? has a lengthy answer which discusses "How is my data interpreted if I don't put a valid Content-Type: header?" specifically in an HTTP context; the answer to that is protocol-specific (in email, for example, the default implied Content-Type: for MIME body parts which do not contain this header is text/plain; charset="us-ascii").

Share:
65,857
Mark A
Author by

Mark A

Updated on March 07, 2021

Comments

  • Mark A
    Mark A over 3 years

    Is there what could be considered a "default" mimetype?

    I've seen "unknown/unknown" and "application/binary". But is there a default to revert to when no other MIME type is found?

  • FF_Dev
    FF_Dev over 8 years
    You're wrong. IETF says default is no content type. read more carrefully your link
  • tripleee
    tripleee over 8 years
    @FF_Dev Not sure what you mean. Are you saying Sampo's link to his own answer is wrong? Or that my answer is wrong? Or something else?
  • FF_Dev
    FF_Dev over 8 years
    @tripleee His answer says "Do not send MIME type for unknown data." which is different than this answer. So either his comment is irronical, either it is wrong. It deserved to be highlighted
  • Sampo Sarrala - codidact.org
    Sampo Sarrala - codidact.org about 8 years
    tripleee & @FF_Dev I think that my answer was not phrased clearly enough and TLDR part was a bit confusing as I did not made it completely clear what you should leave out when dealing with unknown stuff.
  • tripleee
    tripleee about 8 years
    @SampoSarrala The answer talks about HTTP specifically, though; MIME has many applications, many of which may be governed by other specifications, or none at all. A specific counter-example is email, where omitting the content type implies text/plain, for backwards compatibility.