Headers in HTTP Requests

Preferences - Do not show ads

Information about the type and capabilities of a client device such as a cell phone can be found in the headers of HTTP requests received at the server-side. Here are some of the headers that are useful for detecting user agent types, features and capabilities of client devices:

  • The Accept header

  • The User-Agent header

  • The Accept-Charset header

  • The Accept-Language header

  • The x-wap-profile header and the Profile header. They contain the URL to a UAProf document.

The Accept Header -- Find the MIME Media Types that will be Accepted by a User Agent

The Accept header contains a list of MIME media types that will be accepted by the user agent. We can use the Accept header to find out the file types that can be handled by the user agent. The Accept header contains something like this:

application/vnd.wap.wmlscriptc, text/vnd.wap.wml, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/html, multipart/mixed, */*

The above Accept header is generated by the Nokia 6230i cell phone emulator. It states that the Nokia 6230i cell phone can handle WMLScript scripts, WML documents, XHTML MP documents, HTML documents, etc. "*/*" means all MIME media types. Similarly, if you see "application/*", it means all MIME types that begin with "application/" are acceptable. If "*" is used in the Accept header, the information we can get is more limited. For example, some cell phones include the MIME type "text/vnd.sun.j2me.app-descriptor" in the Accept header, which tells us the cell phone is capable of running J2ME programs. However, if what we can find is "*/*", we are not sure whether the cell phone can ready handle J2ME programs or it can just accept the file and save it locally. In such cases, you may want to use other detection methods such as UAProf.

Now let's say the WML or XHTML MP document downloaded from a WAP server contains an inline image <img src="image.gif" ... />. The Nokia 6230i cell phone will send another HTTP request to the WAP server to get the image file. This time the Accept header will contain something like:

image/vnd.wap.wbmp, image/gif, image/jpg, image/jpeg, image/png, image/bmp, image/x-bmp

The above Accept header states that the Nokia 6230i cell phone accepts image formats like WBMP, GIF, JPEG, PNG, BMP, etc. From this information, we know that Nokia 6230i is a cell phone model that has a color screen since GIF, JPEG, PNG and BMP are image formats that support colors.

To learn further details about the Accept header, please refer to the HTTP/1.1 specification at http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1.

Common MIME Types List

The following table lists some common MIME types that you may find in the Accept header generated by a wireless device such as a cell phone:

File Type

MIME Media Type

Audio 3GPP files (.3gp)


Audio AMR files (.amr)


Audio AMR (wideband) files (.awb)


Audio MIDI files (.mid or .midi)


Audio MP3 files (.mp3)


Audio MP4 files (.mp4)


Audio WAV files (.wav)



HTML files (.html or .htm)


Image BMP files (.bmp)



Image GIF files (.gif)


Image JPEG files (.jpg or .jpeg)


Image PNG files (.png)


Image TIFF files (.tif or .tiff)


Image WBMP (Wireless BMP) files (.wbmp)


Java application JAR files (.jar)




Java application JAD files (.jad)


Plain text files (.txt)


Symbian application SIS files (.sis)


Video 3GPP files (.3gp)


Video MP4 files (.mp4)


WML files (compiled) (.wmlc)


WML files (plain text) (.wml)


WMLScript files (compiled) (.wmlsc)


WMLScript files (plain text) (.wmls)


XHTML MP files (.xhtml, .html or .htm)




Preferences - Do not show ads

Page 2 of 10 Previous Page | Next Page
Contents at a Glance
Print this Web Page | | Back to Top

Feedback Form (Expand)

What do you think about this web page?

Detecting User Agent and Device Capabilities - Table of Contents Detecting User Agent and Device Capabilities - Contents at a Glance Preferences - Change Color Scheme Preferences - Do Not Show Ads Previous Page Next Page