Why the right MIME type matters
- Browsers refuse to run JavaScript or apply CSS served with the wrong type when
X-Content-Type-Options: nosniffis set. - Web fonts, WebP/AVIF images and video may fail to load or download instead of displaying.
- Unknown files fall back to
application/octet-stream, which forces a download.
Search by extension (woff2), by full MIME type (image/png) or by a group such as video/. Copy the Apache or nginx line to fix a server that sends the wrong type.
Frequently asked questions
What MIME type should JavaScript use?
text/javascript is the current standard (RFC 9239).
What is the MIME type for JSON?
application/json.
How do I check what my server sends?
Use the HTTP Headers Checker and look at the Content-Type header.

