How does the browser know the content type if no such header is specified?
3 answers
In most browsers content sniffing unless the type is explicitly declared in the HTTP header. They look for specific captions they know and thus guess the type of media.
See the section Determining the Type of a New Resource in View Context in the HTML 5 Specification or Drafting a Content Type Handling Model for some examples.
+3
source to share
Different browsers handle it differently.
Internet Explorer guesses based on content . In fact, the headlines were often ignored Content-Type
, using their own guesswork instead.
Some browsers also respect the extension.
+2
source to share