开发者

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开发者_JS百科 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.


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜