| Extension | MIME Type | Category |
|---|
MIME (Multipurpose Internet Mail Extensions) types tell browsers, servers, and APIs what kind of data is being transferred. Without the correct MIME type, a browser might render a file as plain text instead of executing it as JavaScript, or prompt a download instead of displaying an image inline.
Content-Type header โ Every HTTP response should declare the MIME type of its body. Content-Type: application/json; charset=utf-8<link> and <script> tags โ The type attribute (though often optional in modern HTML5).enctype attribute for file uploads uses multipart/form-data.In nginx.conf, MIME types are declared in a types block inside http:
| Config line | What it does |
|---|---|
text/html html htm; | Serve .html files with Content-Type: text/html |
application/json json; | Serve .json files as JSON |
font/woff2 woff2; | Serve WOFF2 fonts with the correct type for browser caching |
include mime.types; | Load Nginx's built-in MIME type map (covers most common types) |