Friday, February 7, 2020

MIME types : Multipurpose Internet Mail Extensions

Reference:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types

MIME type serves the same purpose on the Internet that file extensions do on Microsoft Windows.

The simplest MIME type consists of a type and a subtype

type/subtype
Example:
application/javascript



An optional parameter can be added to provide additional details:
type/subtype;parameter=value
For example, for any MIME type whose main type is text, the optional charset parameter can be used to specify the character set used for the characters in the data. If no charset is specified, the default is ASCII (US-ASCII) unless overridden by the user agent's settings. To specify a UTF-8 text file, the MIME type text/plain;charset=UTF-8 is used.
All HTML content should be served with this type.
      text/html
As Per the HTML specification, JavaScript files should always be served using the MIME type text/javascript. 
No other values are considered valid, and using any of those may result in scripts that do not load or run.

text/javascript

Other examples


image
Image or graphical data including both bitmap and vector still images as well as animated versions of still image formats such as animated GIF or APNG. Common examples are image/jpegimage/png, and image/svg+xml.
textList at IANA
Text-only data including any human-readable content, source code, or textual data such as comma-separated value (CSV) formatted data. Examples include text/plaintext/csv, and text/html.

Also read : Http Headers
https://www.tutorialspoint.com/http/http_header_fields.htm

No comments:

Post a Comment

JMeter Simple Controller

  Simple Controller is just a  container  for user request.