Reputation: 774
So far for Mime Types for Zip files I've seen:
I guess my question is which is the "best" and why? Why is there so many choices? I use winrar and it doesn't seem to care what the Mimetype is, but WinZip seems to only like multipart/x-zip and application/octet-stream. is there a Mimetype I can have all Zip files be downloaded as that will work in all programs?
thanks!
Upvotes: 56
Views: 58537
Reputation: 9239
media-type/subtype-identifier
. Example: image/png
.x-
prefix of a subtype-identifier indicates that it is experimental and non-standard (not registered with IANA).application/zip
is a standard MIME type for zip files, officially registered with IANA. It seems like a good first choice :)application/octet-stream
is defined in RFC 2045 and 2046: The “octet-stream” subtype is used to indicate that a body contains arbitrary binary data, so the content can be anything, not just zip.multipart/x-zip
- unlike a “discrete” type, the “multipart” type is one which represents a document that's comprised of multiple component parts, each of which may have its own individual MIME type. I suspect that the logic here is that a compressed file consists of multiple files. Thus, zip fits the “multipart” definition. But to me, it looks like overinterpretation, I would expect plain-text delimiters between parts to classify content as multipart. Moreover, it's not registered as a standard.application/zip-compressed
- a non-standard type, the naming violates RFC2046: A media type value beginning with the characters “X-” is a private value, to be used by consenting systems by mutual agreement. Any format without a rigorous and public definition must be named with an “X-” prefixapplication/x-zip-compressed
- some non-standard convention, I'm not sure if there is any significant usageapplication/x-zip
- some non-standard convention, I'm not sure if there is any significant usageUpvotes: 18
Reputation: 14160
Registered with IANA MIME type is application/zip : http://www.iana.org/assignments/media-types/application/zip
WinZip is not a reference implementation (since originally ZIP standard is developed by PkWare).
Upvotes: 35