What is MIME type "application/x-spectrum-tzx"?

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

application/x-spectrum-tzx is a MIME type for a cassette tape image format used with the ZX Spectrum computer system.
It holds digital copies of tape data that originally came from cassette tapes. These images capture the precise timing and control signals needed to load software as if from real tapes.
Files using this format typically have extensions like CDT and TZX.
This MIME type is essential for tools that emulate or archive ZX Spectrum cassette tapes.
For additional insights, visit World of Spectrum.

Associated file extensions

Usage Examples

HTTP Header

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


    Content-Type: application/x-spectrum-tzx    
  

HTML

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


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

Associated file extensions

FAQs

What software opens files served as application/x-spectrum-tzx?

You need a specific ZX Spectrum emulator to open these files. Popular desktop emulators include Fuse, Spectaculator, and ZEsarUX. Some websites also embed JavaScript-based emulators that can load these files directly in the browser.

How do I configure Apache to serve .tzx files correctly?

To ensure browsers recognize the file type, add the MIME type definition to your .htaccess file or main configuration. Use the line: AddType application/x-spectrum-tzx .tzx .cdt. This helps prevent the browser from misidentifying the file as generic text or binary data.

Do web browsers support application/x-spectrum-tzx natively?

No, modern browsers like Chrome, Firefox, and Edge do not have built-in support for ZX Spectrum tape images. If you click a link to a file with this MIME type, the browser will typically download it rather than playing it, unless the website uses a specifically coded web-emulator.

What is the difference between TZX and TAP formats?

While both store ZX Spectrum data, TZX (application/x-spectrum-tzx) preserves the exact timing and magnetic pulse patterns of the original cassette, which is necessary for games with custom "turbo" loaders or copy protection. The TAP format is simpler and only stores standard ROM-loading data blocks.

How do I add support for this MIME type in Nginx?

You can add the type to your mime.types file or inside a specific server block. Add the following line within the types block: application/x-spectrum-tzx tzx cdt;. Reload Nginx to apply the changes.

Why are .cdt files associated with this MIME type?

The CDT extension is used for Amstrad CPC tape images, but the underlying file structure is identical to the TZX format used by the ZX Spectrum. Because the internal structure is the same, application/x-spectrum-tzx (or sometimes application/x-amstrad-cdt) is used interchangeably for both extensions.

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.