DNS & Glossary

MIME type (Media type)

The label that tells a browser what a file is — text/html, application/json, image/png — carried in the Content-Type header and central to both rendering and security.

What it is

A MIME type has a type and subtype (text/html, application/json, image/webp). Servers declare it in Content-Type so clients parse the body correctly. Because browsers may otherwise guess (sniff) the type, pairing correct types with X-Content-Type-Options: nosniff prevents type-confusion attacks.

Why it matters

  • The wrong MIME type causes content to render incorrectly or not at all.
  • Type confusion is a security risk that nosniff plus correct types mitigate.

Common mistakes

  • Serving JSON or JavaScript as text/plain, breaking clients or triggering sniffing.
  • Omitting charset on text types, causing encoding issues.

How WebInspect checks this

  • WebInspect reports the Content-Type of responses and whether nosniff is set.