Which HTTP header is used to prevent browsers from interpreting files as a different MIME type than specified?

Web Development Medium

Web Development — Medium

Which HTTP header is used to prevent browsers from interpreting files as a different MIME type than specified?

Key points

  • MIME-sniffing can lead to security vulnerabilities
  • nosniff forces the browser to respect the Content-Type header
  • This is a critical defense-in-depth header

Ready to go further?

Related questions