Oceanic Blogger Template

Wednesday, March 31, 2010

MIME Types For Mobile sites

Posted by Raj at 12:49 AM
MIME Type(s) File Extension(s) File Contents Common Uses
application/vnd.wap.xhtml+xml
application/xhtml+xml xhtml XHTML-MP markup Mobile web pages
text/html html HTML Mobile web pages for smartphones
text/css css CSS1, CSS2 and Wireless CSS Cascading style sheets for mobile web documents
text/vnd.wap.wml wml WML markup Lightweight mobile web pages for older or low-end mobile devices
image/vnd.wap.wbmp wbmp Wireless Bitmap Image Black-and-white image format used for older or low-end mobile devices

that support only WML in the microbrowser.
text/vnd.wap.wmlscript wmls WML Script Scripting language used with WML
text/vnd.sun.j2me.app-descriptor jad Java Application Descriptor Metadata about a Java ME application for

mobile devices. Contains URI to a JAR file that is the mobile application binary.
application/java-archive Binary Java Archive Archive of compiled binary Java class files. Used as packaging format

for Java ME mobile applications.
audio/x-midi mid MIDI Audio File MIDI ringtones
audio/vnd.qcelp qcp QCELP Audio file mobile audio
video/3gpp 3gp 3GP Video File 3GP encoding for mobile video files
video/mp4 mp4 MPEG4 Video File MPEG4 encoding for mobile video files
x-nokia-widget wgz Nokia Widget Archive Home screen widget for Nokia mobile phones
application/vnd.wap.mms-message mms Binary MMS in MMS Encapsulation Protocol format Viewing and sending MMS messages
application/vnd.symbian.install sis Symbian installer Older file format for Symbian application installers
x-epoc/x-sisx-app sisx Symbian installer Newer file format for Symbian application installers








header('Content-Type: text/vnd.wap.wml');
?>











Here is an example of using AddType directives .htaccess files to introduce new content types for mobile markup mapped to

file extensions. One directive is allowed per line of the configuration file:


# Add Mobile MIME types for xhtml, wml, wbmp and wmls file extensions
AddType application/vnd.wap.xhtml+xml .xhtml
AddType text/vnd.wap.wml .wml
AddType image/vnd.wap.wbmp .wbmp
AddType text/vnd.wap.wmlscript .wmls

A single AddType directive can associate multiple file extensions with the same MIME type. Here is an example that associates

xhtml and xhtm file extensions with the application/vnd.wap.xhtml+xml content type:


AddType application/vnd.wap.xhtml+xml .xhtml .xhtm



 

The configuration in .htaccess files affects the directory in which the file is placed and all subdirectories. But, there is

no inheritance for directives in .htaccess configuration. The .htaccess file nearest to the target web document is the

configuration file used to serve the document. Make sure to upload your .htaccess file into the appropriate web server

location.

There are performance implications when using multiple .htaccess files across a website, especially if a single Apache

instance hosts multiple domains. Because configuration is distributed across the file system, Apache must inspect the

directory hierachy to determine which .htaccess file applies for a HTTP request. Think carefully when creating multiple

.htaccess configuration files and centralize wherever possible.

0 comments:

Post a Comment

Popular Posts

 

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