Dolph
Dolph

Reputation: 50650

MIME-type conventions, standards or limitations?

Given a new, proprietary file format that cannot currently be handled by any known application, I assume you can just invent a new MIME type value as follows:

Content-Type: application/my-arbitrary-format

Assuming this is the way to go, are there any limitations (format, syntax, length, reserved words, or otherwise), standards (IETF, ISO, W3C, IEEE, etc), or conventions (like the slash type/format)?

Note that I do NOT want to use a known MIME type value, because the browser and/or OS should not make assumptions about what can or cannot open the file.

Upvotes: 17

Views: 4959

Answers (2)

Cory Klein
Cory Klein

Reputation: 55620

This page gives conventions for naming MIME types. Here is the section about Custom MIME Types:

  • Use x. as prefix to the subtype for experimental MIME types. Note that the x- prefix is also valid for this purpose, but is discouraged in favor of x. to promote symmetry with other prefixes.

  • Use vnd. as prefix to the subtypte for vendor specific MIME types which are part of a commercial product. The vnd. prefix should be followed by the vendor name and subtype separated by a period (e.g. application/vnd.mozilla.xul+xml).

  • Use prs. as prefix to the subtype for personal/vanity MIME types which aren't part of a commercial product.

Upvotes: 19

Brad
Brad

Reputation: 163252

To do this correctly, you can register your new type with IANA. http://www.iana.org/assignments/media-types/

Upvotes: 7

Related Questions