What is MIME type "text/x-miniscript"?

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

text/x-miniscript is the MIME type for files that hold source code written in MiniScript.
It notes that the file contains plain text meant for interpretation by a MiniScript engine.
Files with this MIME type are typically saved with the file extension MS.
For further details on MiniScript, check the MiniScript Official Site.

Associated file extensions

Usage Examples

HTTP Header

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


    Content-Type: text/x-miniscript    
  

HTML

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


    <a href="file.dat" type="text/x-miniscript">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', 'text/x-miniscript');    
      res.end('Content here');    
    }).listen(3000);    
  

Associated file extensions

FAQs

What is the text/x-miniscript MIME type used for?

This MIME type identifies files containing MiniScript source code, which typically use the .ms extension. It indicates to the operating system or web server that the file is plain text intended to be read or executed by a MiniScript interpreter.

How do I open a file sent as text/x-miniscript?

Because these files are plain text, you can view and edit them in any code editor like VS Code, Sublime Text, or standard Notepad. To actually run the code, you will need the MiniScript environment or a compatible host application like Mini Micro.

How do I configure Apache to serve .ms files as text/x-miniscript?

You can add the MIME type definition to your .htaccess file or main configuration. Add the line AddType text/x-miniscript .ms to ensure the server sends the correct header instead of treating the file as generic plain text.

What is the Nginx configuration for MiniScript files?

In Nginx, you should modify your mime.types file or add a types block inside your server configuration. Use the directive types { text/x-miniscript ms; } and reload the server to apply the changes.

Will web browsers execute text/x-miniscript files automatically?

No, standard browsers like Chrome or Firefox do not include a MiniScript engine. If you navigate directly to a file with this MIME type, the browser will usually display the raw code as text or ask you to download the .ms file.

Are there other file formats that use the .ms extension?

Yes, the .ms extension is also commonly used for 3ds Max Scripts (Maxwell Script). While the extension is the same, the content differs; checking for the text/x-miniscript MIME type helps distinguish modern MiniScript code from legacy 3D modeling scripts.

Is text/x-miniscript safe to run?

Viewing the file in a text editor is completely safe. However, like any executable code, you should only run .ms scripts if you trust the author, as they can automate tasks on your system.

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.