What is MIME type "application/gzipped"?
A MIME type is a string that tells browsers and other tools how to handle a particular kind of file.
application/gzipped designates files compressed using the gzip algorithm.It cuts file sizes and speeds up transfers.
It is a common format on Unix and Linux systems and in web server setups.
- Saves storage space by reducing file size.
- Improves network transfer speeds.
- Maintains file integrity within an archive.
For more details on the compression method, check the Gzip Wikipedia page.
Associated file extensions
Usage Examples
HTTP Header
When serving content with this MIME type, set the Content-Type header:
Content-Type: application/gzipped
HTML
In HTML, you can specify the MIME type in various elements:
<a href="file.dat" type="application/gzipped">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/gzipped');
res.end('Content here');
}).listen(3000);
Associated file extensions
FAQs
Is application/gzipped the standard MIME type for Gzip files?
No, the official IANA standard is application/gzip. However, application/gzipped and application/x-gzip are common legacy variants often found in older server configurations or specific software implementations.
How do I open a file sent with the application/gzipped MIME type?
You need decompression software compatible with the Gzip algorithm. On Windows, you can use tools like 7-Zip or WinRAR; on Linux and macOS, the command line tool gunzip or the default archive manager will handle gz files automatically.
How do I configure Apache to serve files as application/gzipped?
You can map the extension in your .htaccess or httpd.conf file using the AddType directive. Add the line AddType application/gzipped .gz to ensure Apache sends this specific header for Gzip files.
Why is my browser downloading the file instead of displaying the content?
If the server sends Content-Type: application/gzipped, the browser treats it as a binary file download. To have the browser automatically decompress and display content (like HTML), the server must send the content's original MIME type (e.g., text/html) combined with a Content-Encoding: gzip header.
What is the relationship between application/gzipped and .tgz files?
A tgz file is a TAR archive compressed with Gzip. While these often have their own MIME types like application/x-gtar, servers frequently serve them as application/gzipped because the outer layer is Gzip compression.
How do I set this MIME type in Nginx?
You can modify the mime.types file or use the types directive inside your server block. Add the line application/gzipped gz; inside the types { ... } block to associate the extension with this MIME type.
Does using application/gzipped improve website performance?
Using the MIME type itself does not improve performance; it simply identifies the file format. However, using Gzip compression (which this type represents) significantly reduces file sizes, leading to faster transfer speeds and lower bandwidth usage.
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.