What is MIME type "application/mac-binhex40"?
A MIME type is a string that tells browsers and other tools how to handle a particular kind of file.
The MIME type application/mac-binhex40 is used for BinHex encoding. It converts binary files into text. This makes them safe to transfer over email or text-only systems.
It was created for classic Macintosh systems to pack both file data and resource forks.
- Main use: Transferring Macintosh files in environments that only support text.
- Other use: Archiving complete file structures with metadata.
- Additional use: Preserving data integrity during cross-platform transfers.
Common file types using this MIME type include: HEX, HQX, and HCX.
For more details, visit BinHex on Wikipedia.
Associated file extensions
Usage Examples
HTTP Header
When serving content with this MIME type, set the Content-Type header:
Content-Type: application/mac-binhex40
HTML
In HTML, you can specify the MIME type in various elements:
<a href="file.dat" type="application/mac-binhex40">Download file</a>
Server-side (Node.js)
Setting the Content-Type header in Node.js:
const http = require('http');
http.createServer((req, res) => {
res.setHeader('Content-Type', 'application/mac-binhex40');
res.end('Content here');
}).listen(3000);
Associated file extensions
FAQs
What is the application/mac-binhex40 MIME type used for?
This MIME type indicates a file encoded with BinHex 4.0, a legacy format designed to convert binary Macintosh files into 7-bit ASCII text. It ensures that both the data fork and the resource fork of Mac files are preserved during transfer over text-only protocols like email.
How do I open a file with the .hqx extension?
You need decompression software that supports legacy Mac formats. On macOS, tools like The Unarchiver or StuffIt Expander are commonly used. On Windows, you can use WinZip or 7-Zip to extract the contents of an .hqx file.
Why does the browser display text gibberish instead of downloading the file?
This occurs if the web server incorrectly serves the file as text/plain instead of application/mac-binhex40. To fix this, right-click the link and choose Save Link As, or contact the site administrator to correct the MIME type configuration.
How do I configure Apache to serve BinHex files correctly?
You should add the MIME type directive to your .htaccess or httpd.conf file. Use the line: AddType application/mac-binhex40 .hqx .hex. This tells the browser to treat the file as an application requiring download or a helper application.
Is application/mac-binhex40 still in common use?
No, it is considered a legacy format. Modern macOS systems prefer Apple Disk Images (.dmg) or standard ZIP archives, as modern internet protocols handle binary data reliably without needing text conversion.
What is the difference between BinHex and standard ZIP files?
BinHex was specifically created to preserve the resource fork (metadata) of classic Mac files, which standard ZIP tools often stripped away in the past. Today, modern compression tools handle Mac metadata correctly, making BinHex largely obsolete.
Are there security risks associated with BinHex files?
Yes, like any archive format, an application/mac-binhex40 file can contain malware or viruses inside the encoded data. Always scan downloaded files with antivirus software before extracting them.
General FAQ
What is a MIME type?
A MIME (Multipurpose Internet Mail Extensions) type is a standard that 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 important because they help browsers and servers understand how to process a file. When a browser receives a file from a server, it uses the MIME type to determine how to display or handle the content, whether it's an image to display, a PDF to open in a viewer, or a video to play.
MIME types consist of a type and a subtype, separated by a slash (e.g., text/html, image/jpeg, application/pdf). Some MIME types also include optional parameters.
How do I find the MIME type for a file?
You can check the file extension or use a file identification tool such as file --mime-type on the command line. Many programming languages also provide libraries to detect MIME types.
Why are multiple MIME types listed for one extension?
Different applications and historical conventions may use alternative MIME identifiers for the same kind of file. Showing them all helps ensure compatibility across systems.