A MIME type is a label used to identify a type of data. It is used so software can know how to handle the data. It serves the same purpose on the Internet that file extensions do on Microsoft Windows. So if a server says "This is text/html" the client can go "Ah, this is an HTML document, I can render that internally", while if the server says "This is application/pdf" the client can go "Ah, I ...
An Internet media type, originally called a MIME type after MIME (Multipurpose Internet Mail Extensions) and sometimes a Content-type after the name of a header in several protocols whose value is such a type, is a two-part identifier for file formats on the Internet.
html - What is MIME? What is it for exactly? - Stack Overflow
Of course, the correct MIME media type for JSON is application/json, but it's necessary to realize what type of data is expected in your application. For example, I use Java Ext GWT and the server response must go as text/html but contains JSON data.
Bonus: It's accessible for most of the MIME Types and also you can add custom Mime Types in the getMimetype function. Also, it has FULL SUPPORT for MS Office Files Mime Types. The steps to calculate mime type for a file in this example would be: The user selects a file. Take the first 4 bytes of the file using the slice method.
How to recognize a valid MIME type? IANA maintains a list of all registered media types and subtypes. MIME types follow a format: media-type/subtype-identifier. Example: image/png. The x- prefix of a subtype-identifier indicates that it is experimental and non-standard (not registered with IANA). Now about the zip specifically... application/zip is a standard MIME type for zip files ...