# MIME Type Reference — MIME Reference, Topic Guides, Server & Framework Guides For the full tool, see: [https://capytoolkit.com/tools/network/mime-reference/](https://capytoolkit.com/tools/network/mime-reference/) ## MIME Type Reference [application/json](https://capytoolkit.com/tools/network/mime-reference/reference/#application-json): application/json is the standard Content-Type for REST API responses and JSON file serving. RFC 8259 definition, charset rules, and server config snippets. [application/pdf](https://capytoolkit.com/tools/network/mime-reference/reference/#application-pdf): application/pdf is the MIME type for PDF files. RFC 8118 definition, inline vs forced download, security risks, and Nginx, Apache, Caddy config snippets. [application/javascript](https://capytoolkit.com/tools/network/mime-reference/reference/#application-javascript): application/javascript is the correct MIME type for JavaScript. RFC 9239 deprecates text/javascript. CSP enforcement, ES module serving, and server config. [application/wasm](https://capytoolkit.com/tools/network/mime-reference/reference/#application-wasm): application/wasm is required for WebAssembly in browsers. W3C specification, strict enforcement rules, Nginx config, CDN setup, and Emscripten loader requirements. [application/octet-stream](https://capytoolkit.com/tools/network/mime-reference/reference/#application-octet-stream): application/octet-stream is the generic binary MIME type. RFC 2046 definition, forced download behaviour, when not to use it, and content-type sniffing security. [image/webp](https://capytoolkit.com/tools/network/mime-reference/reference/#image-webp): image/webp delivers smaller files than JPEG and PNG at equivalent quality. IANA registration, browser support timeline, picture element fallback, and server config. [image/avif](https://capytoolkit.com/tools/network/mime-reference/reference/#image-avif): image/avif is the most compressed modern image format for the web. AV1 spec, browser support matrix, picture element fallbacks, and CDN and Next.js integration. [image/svg+xml](https://capytoolkit.com/tools/network/mime-reference/reference/#image-svg-xml): image/svg+xml is the MIME type for Scalable Vector Graphics. W3C spec, security model for inline vs external SVG, CORS requirements, and server configuration. [video/mp4](https://capytoolkit.com/tools/network/mime-reference/reference/#video-mp4): video/mp4 is the most compatible web video format. IANA registration, H.264 vs H.265 vs AV1 codec notes, byte-range requests for seeking, and CORS configuration. [font/woff2](https://capytoolkit.com/tools/network/mime-reference/reference/#font-woff2): font/woff2 is the preferred web font format. RFC 8081 definition, CORS requirements for cross-origin fonts, Brotli compression, and CSS @font-face format hints. [multipart/form-data](https://capytoolkit.com/tools/network/mime-reference/reference/#multipart-form-data): multipart/form-data is required for HTML file uploads. RFC 7578 definition, boundary parameter, comparison with urlencoded, and parsing in Node.js, Python, and Java. [text/event-stream](https://capytoolkit.com/tools/network/mime-reference/reference/#text-event-stream): text/event-stream is the MIME type for Server-Sent Events. WHATWG specification, SSE protocol fields, EventSource API, and comparison with WebSocket and long-polling. ## Topic Guides [MIME Types: Nginx, Apache, and Caddy Configuration](https://capytoolkit.com/tools/network/mime-reference/mime-types-server-configuration/): Configure MIME types in Nginx, Apache, and Caddy. Covers AVIF, WASM, WOFF2, how to test with curl, and common server misconfigurations. [MIME Types and Browser Security](https://capytoolkit.com/tools/network/mime-reference/mime-types-browser-security/): Browsers enforce MIME types as part of their security model. MIME sniffing risks, X-Content-Type-Options: nosniff, CSP script-src, and cross-origin font CORS rules. [MIME Types in REST API Design](https://capytoolkit.com/tools/network/mime-reference/mime-types-rest-api-design/): Content-Type and Accept headers are your API's format contract. Setting request types, content negotiation with Accept, and custom vendor MIME types with +json suffix. [MIME Types for File Upload Validation](https://capytoolkit.com/tools/network/mime-reference/mime-types-file-upload-validation/): File upload validation requires checking MIME type on both client and server. File.type limitations, magic byte detection, and validation in Multer, Django, and Spring Boot. [Modern Image MIME Types: AVIF, WebP, and Fallbacks](https://capytoolkit.com/tools/network/mime-reference/mime-types-modern-image-formats/): Choosing the right image MIME type affects page weight and browser compatibility. AVIF vs WebP compression, browser support, picture element patterns, and CDN negotiation. [Deprecated MIME Types and Their Modern Replacements](https://capytoolkit.com/tools/network/mime-reference/deprecated-mime-types/): Several MIME types are formally superseded. text/javascript, text/xml, application/ecmascript, image/x-icon deprecation history, risks of serving them, and how to audit. [MIME Types for Video Streaming: HLS, DASH, and WebRTC](https://capytoolkit.com/tools/network/mime-reference/mime-types-video-streaming/): Video streaming formats each require a specific MIME type. HLS manifests and segments, DASH manifest serving, MSE and addSourceBuffer codec parameters. [Web Font MIME Types: WOFF2, TTF, and CORS](https://capytoolkit.com/tools/network/mime-reference/mime-types-web-fonts/): Web font MIME types affect browser parsing and CORS enforcement. font/woff2 as the only modern format, cross-origin CORS rules, and CSS @font-face format hints. ## MIME Type Reference: Code Examples [Nginx MIME Type Configuration](https://capytoolkit.com/tools/network/mime-reference/code-examples/#nginx-mime-type-configuration): Configure MIME types in Nginx using the types block, include mime.types, and default_type. Add image/avif, application/wasm, and font/woff2. Test with nginx -t and curl. [Apache MIME Type Configuration](https://capytoolkit.com/tools/network/mime-reference/code-examples/#apache-mime-type-configuration): Configure MIME types in Apache using AddType, TypesConfig, and mod_mime. Add image/avif, application/wasm, font/woff2. Test with apachectl -t and curl. [Express.js MIME Types](https://capytoolkit.com/tools/network/mime-reference/code-examples/#express-js-mime-types): Express.js sets MIME types through res.type() and express.static(). Custom type registration, setHeaders callback, and serving AVIF and WASM with correct Content-Type. [Next.js MIME Types](https://capytoolkit.com/tools/network/mime-reference/code-examples/#nextjs-mime-types): Next.js MIME type configuration via headers() in next.config.js, NextResponse in App Router route handlers, and serving AVIF and WASM from the /public directory. [FastAPI MIME Types](https://capytoolkit.com/tools/network/mime-reference/code-examples/#fastapi-mime-types): FastAPI controls MIME types through media_type on Response classes. Response, FileResponse MIME inference, StreamingResponse for binary streams, and AVIF and WASM examples. [Python requests and Content-Type](https://capytoolkit.com/tools/network/mime-reference/code-examples/#python-requests-content-type): The requests library reads and sets Content-Type through response headers and request keyword arguments. json=, data=, files= behaviour, charset parsing, and custom headers. [Cloudflare MIME Type Overrides](https://capytoolkit.com/tools/network/mime-reference/code-examples/#cloudflare-mime-type-overrides): Cloudflare Workers provide full control over response Content-Type headers. Workers new Response constructor, Transform Rules for header overrides, and caching with MIME types.