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.
A media type (also known as a Multipurpose Internet Mail Extensions or MIME type) indicates the nature and format of a document, file, or assortment of bytes. MIME types are defined and standardized in IETF's RFC 6838.
MIME types are case insensitive. They are lowercase by convention only. RFC 2045 says: "The type, subtype, and parameter names are not case sensitive." If you have a MIME type of text/plain that's a type of text and a subtype of plain . So, per the spec, these are not case sensitive.
MIME types are defined by three attributes: language (lang), encoding (enc), and content-type (type). At least one of these attributes must be present for each type. The most commonly used attribute is type. The server frequently considers the type when deciding how to generate the response to the client.
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 thex-
prefix is also valid for this purpose, but is discouraged in favor ofx.
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. Thevnd.
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/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With