3. What are MIME Types?

Web servers choose a suitable MIME type and include it in an HTTP response automatically. They keep a conversion table that contains the mappings between MIME types and file extensions.

For example, let's say a WAP browser requests a WML file named helloWorld.wml from a web / WAP server. The web / WAP server will search for the MIME type associated to the ".wml" extension in the conversion table and includes it in the HTTP response automatically.

4. WAP 1.x / WAP 2.0 MIME Types and File Extensions

Before a web / WAP server can be used to serve WAP 1.x or WAP 2.0 content, you need to make sure its MIME settings have been configured properly. Otherwise WAP browsers cannot display the WAP pages.

The latest versions of some web servers have set the MIME types of WAP 1.x and WAP 2.0 properly by default, which means you do not need to modify anything.

The following table lists the MIME types of WAP 1.x:

File extension

MIME type

Contents of the file



WML markup in plain-text form



Compiled WML markup



WBMP image



WMLScript code in plain-text form



Compiled WMLScript code

The following table lists the MIME types of WAP 2.0:

File extension

MIME type

Contents of the file

.xhtml or .html or .htm






XHTML MP markup in plain-text form



WCSS (WAP CSS or Wireless CSS) code in plain-text form

As you can see in the above table, there are three possible MIME types for XHTML MP files:

Sometimes you may want to detect the MIME types supported by a client browser and then assign an appropriate MIME type to your XHTML MP documents dynamically. For example, if you find that a browser supports the "application/vnd.wap.xhtml+xml" type, you will assign "application/vnd.wap.xhtml+xml" to your XHTML MP documents. If you find that a browser only supports the "text/html" type (e.g. IE 6), you will assign "text/html" to your XHTML MP documents. Please refer to the "Choosing MIME Types Dynamically" section of our XHTML MP tutorial if you want to learn the details.

Previous Page Page 3 of 13 Next Page

Feedback Form (ExpandCollapse)

What do you think about this web page?

(Optional) Please provide us more details. For example, suppose you select option 2 above, can you tell us specifically what information is missing? You can also suggest anything that can help us improve this web page.

(Optional) Your name:

(Optional) Your email address:

Please enter again to confirm:

Due to the amount of messages we received, we may not be able to reply to all messages.