开发者

What is MIME? What is it for exactly?

I was reading an article on COMET recently I 开发者_StackOverflow社区have came across many times the word MIME? I googled it found that MIME is Multipurpose Internet Mail Extension. And also i came across the sentence

multipart/x-mixed-replace" feature of the MIME standard . .

What does multipart/x-mixed-replace means in terms of MIME? And even what is MIME used for? And why?


The MIME type is a description of the data returned by a request on the Internet (originally used by e-mail, and later used by many parts of the web).

Since data can take hundreds (if not thousands) of forms, both textual and binary, it helps a program to know what type of data it is dealing with, rather than trying to write code that figures it out automatically.

The program can use this data to either select a handler (jpg vs. png), or simply refuse to handle data that isn't a type it knows how to handle, or doesn't want to deal with (e.g. an mp3, where it is expecting xml).

This can also be used to classify data (search engines), or restrict it (in a web proxy or e-mail server).

Some examples:

  • image/gif
  • text/html
  • video/mpeg
  • application/zip
  • application/x-font-ttf

For bigger lists of MIME type examples, see these links:

  • http://en.wikipedia.org/wiki/Internet_media_type#List_of_common_media_types
  • http://www.iana.org/assignments/media-types/index.html


An Internet media type, originally called a MIME type after MIME (Multipurpose Internet Mail Extensions) and sometimes a Content-type after the name of a header in several protocols whose value is such a type, is a two-part identifier for file formats on the Internet.

More here.


It's a way of describing a document (or file).

Programs like mail readers and web browsers use the "mime-type" of a document to determine how to handle it.

Each mime type is a string that describes contents

    multipart/x-mixed-replace

Is a particular mime type which typically is used for http server push streams.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜