4.2 What's with the HTTP server MIME types? |
When you access a "web page" using a PC based browser, the "web server" tells your PC browser what kind of document it should expect. This is done by using something called MIME-types. The common MIME type for a plain HTML document is "text/html". However, for a WAP micro browser, which cannot read HTML, the MIME type has to be different. The MIME types for serving WML contents are:
Document type MIME type Typical extension Plain WML documents text/vnd.wap.wml .wml Wireless Bitmap Images image/vnd.wap.wbmp .wbmp Compiled WML documents application/vnd.wap.wmlc .wmlc WMLScripts text/vnd.wap.wmlscript .wmls Compiled WML Scripts application/vnd.wap.wmlscriptc .wmlsc To add the above MIME types to the Apache HTTP server, here's what you do:
# MIME Types for WAP AddType text/vnd.wap.wml .wml AddType image/vnd.wap.wbmp .wbmp AddType application/vnd.wap.wmlc .wmlc AddType text/vnd.wap.wmlscript .wmls AddType application/vnd.wap.wmlscriptc .wmlsc
If you do not have control over your Apache server, for instance if you are with an ISP, it is also possible
to add a file called
A typical
DirectoryIndex index.wml addtype text/vnd.wap.wml wml addtype application/vnd.wap.wmlc wmlc addtype text/vnd.wap.wmlscript wmls addtype application/vnd.wap.wmlscriptc wmlsc addtype image/vnd.wap.wbmp wbmp
Note the first line which tells the server that the index file for this directory is called To add the MIME types to a Microsoft IIS server, you need to do the following:
For other servers, see the server documentation. |
[ Main ] [ 04 - Serving WML contents ] |
© Copyright The Wireless FAQ. All Rights Reserved. Terms | Site Map |