What is MIME type "application/pls+xml"?

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

application/pls+xml is a MIME type for XML-based playlist files. These files list media entries for playback. They tell media players which tracks to load and play.

The file type exposed by this MIME type is the PLS file. For more detailed information, see this reference.

Associated file extensions

Usage Examples

HTTP Header

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


    Content-Type: application/pls+xml    
  

HTML

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


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

Associated file extensions

FAQs

What is the difference between application/pls+xml and audio/x-scpls?

application/pls+xml specifies that the playlist data is structured as XML, whereas audio/x-scpls is used for the traditional plain-text (INI-style) format. While both use the .pls extension, media players interpret the internal structure differently based on the MIME type header.

How do I configure Apache to serve XML playlist files?

You can map the file extension to the MIME type in your .htaccess or main configuration file. Add the line AddType application/pls+xml .pls to ensure browsers and media players recognize the content as an XML-based playlist.

Why does my browser download the PLS file instead of playing it?

Most web browsers (like Chrome or Firefox) do not have built-in support for parsing and playing application/pls+xml playlists directly. Instead, the browser downloads the file so you can open it with a dedicated desktop media player like VLC or iTunes.

Can I edit an application/pls+xml file with a text editor?

Yes, because it is an XML-based format, you can edit it using any standard text editor like Notepad++, Sublime Text, or VS Code. Ensure you maintain the valid XML syntax tags so the media player can parse the track list correctly.

Is application/pls+xml safe to open?

Generally, yes, as it is a text file containing a list of links rather than executable code. However, malicious files could theoretically point to harmful URLs. Always ensure you trust the source of the playlist before opening it in your media player.

What should I do if my media player reports a parsing error?

Verify that the file content matches the MIME type. If you are serving a standard Shoutcast-style text file (starting with [playlist]) as application/pls+xml, the player will fail because it expects XML tags. In that case, switch your server configuration to use audio/x-scpls or audio/x-mpegurl.

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.