What is MIME type "application/spss-sav"?

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

The MIME type application/spss-sav designates data files created by IBM SPSS Statistics. These files, represented as SAV files, hold datasets for statistical processing.

They store binary data including variables, observations, and metadata used in statistical studies. This format ensures data integrity during analysis and facilitates reliable data exchange between systems.

For more technical details on file types and extensions, visit Filext.

Associated file extensions

Usage Examples

HTTP Header

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


    Content-Type: application/spss-sav    
  

HTML

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


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

Associated file extensions

FAQs

What is the application/spss-sav MIME type used for?

The MIME type application/spss-sav identifies binary data files created by IBM SPSS Statistics. These files, typically ending in the sav extension, contain structured datasets, including variable names, labels, and the actual data observations required for statistical analysis.

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

To ensure browsers recognize SPSS files, add the MIME type definition to your .htaccess file or main configuration. Use the directive: AddType application/spss-sav .sav. This tells the server to send the correct header when a user requests an SPSS dataset.

Can web browsers display application/spss-sav files directly?

No, modern web browsers (like Chrome, Firefox, or Edge) cannot render SPSS binary data natively. When a server sends the application/spss-sav header, the browser will typically trigger a file download dialog so the user can save the file and open it locally with specialized software.

What software opens files with this MIME type?

The primary application is IBM SPSS Statistics. However, because it is a widely used standard in research, other tools can read it, including the open-source GNU PSPP, and programming languages like R (via the foreign library) or Python (using pandas with pyreadstat).

Why use application/spss-sav instead of text/csv?

Unlike text/csv, which stores unstructured plain text, application/spss-sav is a binary format that preserves critical metadata. This includes variable labels, value labels (e.g., 1='Male', 2='Female'), and missing value definitions, which are essential for maintaining data integrity during statistical processing.

Are there other MIME types used for SPSS .sav files?

Yes, you may occasionally see application/x-spss-sav. The x- prefix indicates a non-standard or experimental type often used before the format was widely standardized. Ideally, you should configure your server to use application/spss-sav, but client applications may accept both.

How do I handle application/spss-sav uploads in PHP?

When validating file uploads, check the $_FILES['file']['type'] property. However, since this can be spoofed, it is safer to verify the file signature (magic number) or use the file extension. Ensure your server accepts the MIME type and that post_max_size is large enough, as datasets can be significant in size.

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.