Oceanic Blogger Template

Thursday, April 1, 2010

Mobile MIME Types

Posted by Raj at 8:44 AM

Mobile MIME types identify the format of mobile web content: textual mobile markup documents, binary viewable and playable content like ringtones, wallpaper and videos and binary executable mobile applications intended for mobile devices.

Common Mobile MIME Types

Here are the most common mobile MIME types:
MIME Type(s)File Extension(s)File ContentsCommon Uses
application/vnd.wap.xhtml+xml
application/xhtml+xml
xhtmlXHTML-MP markupMobile web pages
text/htmlhtmlHTMLMobile web pages for smartphones
text/csscssCSS1, CSS2 and Wireless CSSCascading style sheets for mobile web documents
text/vnd.wap.wmlwmlWML markupLightweight mobile web pages for older or low-end mobile devices
image/vnd.wap.wbmpwbmpWireless Bitmap ImageBlack-and-white image format used for older or low-end mobile devices that support only WML in the microbrowser.
text/vnd.wap.wmlscriptwmlsWML ScriptScripting language used with WML
text/vnd.sun.j2me.app-descriptorjadJava Application DescriptorMetadata about a Java ME application for mobile devices. Contains URI to a JAR file that is the mobile application binary.
application/java-archiveBinaryJava ArchiveArchive of compiled binary Java class files. Used as packaging format for Java ME mobile applications.
audio/x-midimidMIDI Audio FileMIDI ringtones
audio/vnd.qcelpqcpQCELP Audio filemobile audio
video/3gpp3gp3GP Video File3GP encoding for mobile video files
video/mp4mp4MPEG4 Video FileMPEG4 encoding for mobile video files
x-nokia-widgetwgzNokia Widget ArchiveHome screen widget for Nokia mobile phones
application/vnd.wap.mms-messagemmsBinary MMS in MMS Encapsulation Protocol formatViewing and sending MMS messages
application/vnd.symbian.installsisSymbian installerOlder file format for Symbian application installers
x-epoc/x-sisx-appsisxSymbian installerNewer file format for Symbian application installers

How Mobile MIME Types are Used in HTTP

MIME types are used in several ways during a HTTP transaction between a mobile web browser and web server:
Mobile Web Browser: The mobile web browser sends a list of supported MIME types as the value of the Accept HTTP request header. The Accept request header value advertises the mobile content types supported on the device. Web servers optimized for delivering mobile content use the header’s value (and also a device database) to determine the best content to send in the HTTP response.
Web Server: The MIME type associated with a web document is used as the value of the Content-Type HTTP response header. The web server is configured to associate file extensions of mobile content with mobile MIME types. (Web servers generally do not come pre-configured to support mobile MIME types. The webmaster must manually add the MIME types.) When the web server sends a file to a mobile browser and uses the correct mobile MIME type, the mobile browser client knows how to interpret the file: as a web page, mobile application, wallpaper, ringtone, video, etc.
Web Server Template Languages: The MIME type associated with for a document can be manually overridden using a server-side template language like PHP. Here is a PHP example that uses the built-in header function to override the MIME type for a HTTP response:

header('Content-Type: text/vnd.wap.wml');
?>
It is important to correctly configure mobile MIME types on the web server because the mobile browser uses the MIME type (value of Content-Type HTTP response header) to determine whether the web file is viewed in the browser or by launching phone UI (to set a GIF as wallpaper, etc.) or by launching a native application (playing a video in the video player, etc).
Bookmark and Share

0 comments:

Post a Comment

Popular Posts

 

Copyright © 2018 Coding Talk | Designed by Web Hosting Dedicated server