What is MIME type "application/vnd.ms-visio.template"?

A MIME type is a string that tells browsers and other tools how to handle a particular kind of file.

application/vnd.ms-visio.template is the MIME type for Microsoft Visio diagram templates. It stores pre-designed blueprints for creating diagrams and flowcharts.
This format is part of the Office Open XML family. Its files use an XML structure that makes them easier to read and modify. The template is macro-free, which enhances security and compatibility.
Files using this MIME type carry the extension VSTX.
For more details on MIME types, visit this reference.

Associated file extensions

Usage Examples

HTTP Header

When serving content with this MIME type, set the Content-Type header:


    Content-Type: application/vnd.ms-visio.template    
  

HTML

In HTML, you can specify the MIME type in various elements:


    <a href="file.dat" type="application/vnd.ms-visio.template">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-visio.template');    
      res.end('Content here');    
    }).listen(3000);    
  

Associated file extensions

FAQs

Which file extension is associated with application/vnd.ms-visio.template?

This MIME type is exclusively associated with the .vstx file extension. It represents a modern, macro-free template used by Microsoft Visio 2013 and later versions. For macro-enabled templates, the extension .vstm and a different MIME type are used.

How do I configure Apache or Nginx to serve .vstx files?

For Apache, add the line AddType application/vnd.ms-visio.template .vstx to your .htaccess or httpd.conf file. For Nginx, include application/vnd.ms-visio.template vstx; inside the types block of your nginx.conf or mime.types file to ensure browsers handle the file correctly.

Why does my browser download .vstx files as ZIP archives?

This occurs because the .vstx format is based on the Office Open XML standard, which uses a ZIP container to store XML data. If the server fails to send the specific application/vnd.ms-visio.template header, browsers often default to sniffing the file content and identifying it as application/zip.

Is application/vnd.ms-visio.template safe from macro viruses?

Yes, this MIME type is specifically for macro-free templates. The structure of the .vstx file prevents the execution of VBA macros, making it a safer option for downloading and sharing blueprints compared to the macro-enabled .vstm format.

Can web browsers render application/vnd.ms-visio.template files natively?

No, standard web browsers like Chrome, Firefox, and Edge cannot display Visio templates directly. When a server sends this MIME type, the browser will typically prompt the user to download the file so it can be opened in Microsoft Visio or a compatible viewer.

What is the difference between this type and application/vnd.visio?

application/vnd.ms-visio.template is used for the newer, XML-based .vstx files, whereas application/vnd.visio (or application/x-visio) is generally used for older binary Visio files like .vsd or .vst. Using the correct MIME type ensures that the client application recognizes the file version and structure immediately.

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.