All Guides

MIME Types

MIME (Multipurpose Internet Mail Extensions) types are standardized labels that web servers use to identify file types and tell browsers how to handle different content, using formats like text/html for HTML files, image/jpeg for JPEG images, and application/pdf for PDF documents. Proper MIME type configuration became crucial for web servers to ensure browsers displayed content correctly. “apache # Common MIME types in Apache configuration AddType text/html .html .htm AddType text/css .css AddType text/javascript .js AddType image/gif .gif AddType image/jpeg .jpg .jpeg AddType image/png .png AddType application/pdf .pdf AddType application/zip .zip AddType audio/mpeg .mp3 AddType video/quicktime .mov .qt # Force download for certain files <FilesMatch ".(zip|tar|pdf)$"> Header set Content-Disposition attachment </FilesMatch> # Custom MIME type for Flash AddType application/x-shockwave-flash .swf

Why MIME Types Matters

MIME types established the fundamental protocol for content type communication between web servers and browsers, enabling the multi-media web by ensuring images, audio, video, and documents displayed properly across different systems. Understanding MIME types became essential web development knowledge and established patterns for content delivery that continue to influence modern web APIs, file uploads, and content management systems.