
Sign up to save your podcasts
Or


Any content served through HTTP “should” include meta data about its type. This is so the browser/client knows what to do with the content it receives. For example, if the content type header is an image the browser will preview it, if it is HTML it will render the markup and execute any javascript code.
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 had to implement parsing and “sniffing” techniques to detect the type of content when a content type header was not served.
However, this caused security problems and attacks 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 type: https://en.wikipedia.org/wiki/Media_type#Common_examples
Cheers!
Hussein Nasser
By Hussein Nasser4.9
4040 ratings
Any content served through HTTP “should” include meta data about its type. This is so the browser/client knows what to do with the content it receives. For example, if the content type header is an image the browser will preview it, if it is HTML it will render the markup and execute any javascript code.
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 had to implement parsing and “sniffing” techniques to detect the type of content when a content type header was not served.
However, this caused security problems and attacks 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 type: https://en.wikipedia.org/wiki/Media_type#Common_examples
Cheers!
Hussein Nasser

32,267 Listeners

273 Listeners

373 Listeners

12,172 Listeners

990 Listeners

8,108 Listeners

212 Listeners

1,659 Listeners

10,224 Listeners

551 Listeners

513 Listeners

5,546 Listeners

662 Listeners

1,471 Listeners

74 Listeners