Content type however is optional and web masters sometimes don’t set it, which leave the browsers wondering about the content type it is consuming. So browsers started consuming the actual content and parse it in order to detect the type.
However, this caused security concerns that we explain in this video! So to prevent sniffing, web servers can return X-Content-Type-Options: nosniff which opts out browsers from sniffing the content.
Media types: https://en.wikipedia.org/wiki/Media_type#Common_examples