topic
Verified 2026-09-18Common MIME Types
Content-Type values that tell clients how to interpret common web resources.
Return an accurate Content-Type for every resource; do not rely on browsers to infer it.
webhttpmimecontent-type
Common values (http)
text/html; charset=utf-8 text/css text/javascript application/json application/pdf image/svg+xml image/webp
Content-Type describes the media type of the response body. For text formats, include a character set where appropriate, such as text/html; charset=utf-8.
Correct types work together with X-Content-Type-Options: nosniff to prevent content-type confusion.
Common mistakes
- Serving JavaScript as text/plain.
- Using application/octet-stream for files that browsers should render or process directly.
- Confusing Content-Type with Content-Disposition.
Sources