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

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

MIME Type: text/x-newlisp
This label is used for files that contain newLISP source code. It tells systems and applications that the file holds plain text with code specific to the newLISP programming language.
Files with this MIME type include the LSP, KIF, and NL formats.
For more details on newLISP, visit the newLISP website.

Associated file extensions

Usage Examples

HTTP Header

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


    Content-Type: text/x-newlisp    
  

HTML

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


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

Associated file extensions

FAQs

What is the purpose of the text/x-newlisp MIME type?

This MIME type identifies files containing source code written in newLISP, a scripting language dialect of LISP. It indicates to the operating system and web servers that the file is plain text but should be treated as code, commonly associated with extensions like .lsp and .nl.

How do I open a file with the text/x-newlisp content type?

Since these are plain text files, you can view and edit them using any standard text editor like Notepad++, Visual Studio Code, or Sublime Text. Advanced editors use this MIME type to trigger specific syntax highlighting for the newLISP language.

How do I configure Apache to serve newLISP files correctly?

To ensure Apache serves these files with the correct header, add the following line to your .htaccess file or httpd.conf: AddType text/x-newlisp .lsp .nl .kif. This prevents browsers from misinterpreting the file as generic text or binary data.

Will web browsers execute code sent as text/x-newlisp?

No, web browsers do not have built-in interpreters for newLISP. If a user navigates to a file served with this MIME type, the browser will usually display the raw source code as text or prompt the user to download the file.

What does the 'x-' prefix mean in this MIME type?

The x- prefix signifies that text/x-newlisp is a non-standard or experimental type not officially registered with the IANA. However, it is the widely accepted convention for identifying newLISP scripts in web environments.

How can I map this MIME type in Nginx?

You can add the mapping to your mime.types file or inside a types block in your server configuration. Use the syntax: text/x-newlisp lsp nl kif; to associate the relevant extensions with the MIME type.

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.