What is MIME type "application/vnd.ms-xpsdocument"?
A MIME type is a string that tells browsers and other tools how to handle a particular kind of file.
The MIME type application/vnd.ms-xpsdocument marks a file as an XPS document. These files store pages with fixed layouts using XML. They are developed by Microsoft to preserve fonts, images, and graphics for clear display and printing.
Files are saved with extensions like XPS and OXPS.
- View documents with exact formatting
- Print high-quality pages consistently
- Archive digital documents reliably
- Share fixed-layout files across different devices
This format works much like a PDF, offering a stable view of page content. For more details on XPS, check out this resource.
Associated file extensions
Usage Examples
HTTP Header
When serving content with this MIME type, set the Content-Type header:
Content-Type: application/vnd.ms-xpsdocument
HTML
In HTML, you can specify the MIME type in various elements:
<a href="file.dat" type="application/vnd.ms-xpsdocument">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/vnd.ms-xpsdocument');
res.end('Content here');
}).listen(3000);
Associated file extensions
FAQs
What type of files use application/vnd.ms-xpsdocument?
This MIME type is used for XPS (XML Paper Specification) documents, which are fixed-layout files similar to PDFs. These files typically use the .xps extension and are designed by Microsoft to preserve document formatting and fonts across different devices.
Do web browsers support viewing XPS files natively?
No, most modern browsers like Chrome, Firefox, and Safari do not support rendering application/vnd.ms-xpsdocument content directly. Users will typically be prompted to download the file, which must then be opened with a desktop application like the Windows XPS Viewer.
How do I configure IIS to serve XPS files?
In Internet Information Services (IIS), you must add a MIME map if it is missing. Open the MIME Types feature for your site, click Add, set the file extension to .xps, and set the MIME type to application/vnd.ms-xpsdocument.
How do I add the XPS MIME type to Apache or Nginx?
For Apache, add the line AddType application/vnd.ms-xpsdocument .xps to your .htaccess or configuration file. For Nginx, include application/vnd.ms-xpsdocument xps; within the types { ... } block of your mime.types file.
Why do I get a 404 error when downloading an .xps file?
This often occurs because the web server does not recognize the .xps extension by default and blocks the request. You need to manually register the application/vnd.ms-xpsdocument MIME type in your server's configuration to resolve this issue.
Is application/vnd.ms-xpsdocument the same as application/pdf?
No, while both formats serve similar purposes (fixed-layout documents), they are technically different. PDF is an Adobe standard using application/pdf, while XPS is a Microsoft XML-based format. XPS files generally do not support interactive elements like forms or JavaScript, making them simpler but less versatile than PDFs.
What is the difference between .xps and .oxps extensions?
The .xps extension uses the application/vnd.ms-xpsdocument MIME type, while .oxps stands for OpenXPS, a standardized version of the format. While they are closely related, OpenXPS files technically use the application/oxps MIME type, though some servers may serve them interchangeably depending on configuration.
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.