views:

38

answers:

2

Hi Guys;

I have been reading about how to build plug-ins and this "MIME type" keeps getting discussed in it, i have tried to look into and know that its Multipurpose Internet Mail Extensions (MIME) but no suitable explanation of how it relates to browser plug-ins as in what i need to know about it for building plug-ins is provided, please explain in clear and simple words. What it is? why do plug-ins have a MIME type?

Thanks

+1  A: 

I couldn't possibly explain it better than wikipedia does: http://en.wikipedia.org/wiki/MIME_type

In addition to e-mail applications, Web browsers also support various MIME types. This enables the browser to display or output files that are not in HTML format.

IOW, it helps the browser (or content consumer, because it may not just be a browser) determine what content they are about to consume; this means a browser may be able to make a decision on the correct plugin to use to display content, or a media player may be able to load up the correct codec or plugin.

slugster
+3  A: 

A MIME type is a label for a given type of data so software can know how to handle the data. It serves the same purpose on the Internet that file extensions do on Microsoft Windows.

So if a server says "This is text/html" the client can go "Ah, this is an HTML document, I can render that internally", while if the server says "This is application/pdf" the client can go "Ah, I need to launch the FoxIt PDF Reader plugin that the user has installed and that has registered itself as the application/pdf handler."

David Dorward