What is MIME type "application/x-mswrite"?
A MIME type is a string that tells browsers and other tools how to handle a particular kind of file.
application/x-mswrite is a MIME type used for files created by the Microsoft Write application. It indicates that the file contains simple text with basic formatting.This MIME type helps systems and servers identify the content. When a file with this type is opened, the system understands it should use a compatible editor. Files of this type carry the WRI extension.
- Main use: Marking text documents from the Microsoft Write editor.
- Additional use(s): Allowing file handling systems to process and launch the correct editing software automatically.
- Key fact: It is non-standard and mainly seen on older Windows versions.
- Application context: Primarily used on legacy systems where Microsoft Write was the default basic word processor.
Associated file extensions
Usage Examples
HTTP Header
When serving content with this MIME type, set the Content-Type header:
Content-Type: application/x-mswrite
HTML
In HTML, you can specify the MIME type in various elements:
<a href="file.dat" type="application/x-mswrite">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/x-mswrite');
res.end('Content here');
}).listen(3000);
Associated file extensions
FAQs
How do I open a file with the MIME type application/x-mswrite?
You can open these files using Microsoft WordPad, which is included in most versions of Windows. Modern word processors like Microsoft Word and LibreOffice Writer can also import and convert .wri files.
Can web browsers display application/x-mswrite files directly?
No, browsers like Chrome, Firefox, and Edge cannot render Microsoft Write documents natively. Instead, they will prompt the user to download the file to their computer to be opened with a compatible desktop application.
How do I add support for application/x-mswrite in Apache?
To ensure your Apache server serves .wri files with the correct header, add AddType application/x-mswrite .wri to your .htaccess file or the main configuration. This prevents the file from being misidentified as text/plain or application/octet-stream.
What is the difference between application/x-mswrite and application/rtf?
The application/x-mswrite type is for the older, binary Microsoft Write format, while application/rtf is for Rich Text Format files. Although WordPad replaced Write and defaults to RTF, the two formats use different internal coding.
Why does the MIME type start with "x-"?
The x- prefix signifies that application/x-mswrite is a non-standard or proprietary subtype. It was defined by Microsoft for their specific software rather than being a standard type registered with the IANA.
How do I configure Nginx to serve .wri files correctly?
You should verify that your mime.types file includes the mapping for this extension. If missing, add the line application/x-mswrite wri; inside the types { ... } block in your Nginx configuration.
Is the application/x-mswrite format still in common use?
No, this format is considered obsolete and is rarely used today. It has been largely superseded by modern formats like .docx (application/vnd.openxmlformats-officedocument.wordprocessingml.document) and .rtf.
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.