Mobile devices use a standard HTTP request when visiting a WAP site. This is independent from WAP 1 or WAP 2.
In WAP 1 browsers used a WAP gateway as a requirement.
In WAP 2 using a WAP gateway is optional. Anyway most mobile operators offer some different features and functionality when using a WAP gateway. Sometimes using a WAP gateway can be required or might offer some extra. While WAP 2 uses a standard HTTP request and the browser supports a standard TCP/IP communication, some devices will require a WAP gateway in the settings.
If the browser is accessing a remote site through a WAP gateway there are very good chances that the gateway will add extra headers. Notably Openwave’s MAG usually adds a number of headers.
Microsoft’s IEMobile will specify a number of extra HTTP headers.
Other browsers might specify other headers.
Accessing HTTP headers set by a mobile device is the same as with any other HTTP request from a standard web browser.
The OMA defined an new HTTP header that should be specified by those browsers that have a UAProf defined. The standard is to use x-wap-profile. Some browsers might simply specify profile.
Also, browsers might specify another header, x-wap-profile-diff where differences from the UAProf are defined directly in the HTTP. This is not widely used.
The Openwave gateway might set a lot of extra headers, if configured.
Recognizing these headers is quite easy. All of their names start with ‘x-up-devcap’.
Some of these values might be meaningful only for WML.
Some will certainly look outdated as they were brought along from the old days of WAP 1 or even HDML.
Here is a list with a short description:
| Header name | Description |
|---|---|
| x-up-devcap-charset | String, specifies the supported charset |
| x-up-devcap-max-pdu | Integer, specifies the max size of a full page and contents associated (images) |
| x-up-devcap-iscolor | Boolean value, defines if the screen supports colors |
| x-up-devcap-numsoftkeys | Integer, specifies the number of softkeys available |
| x-up-devcap-sceenchars | String, specifies how many characters will fit in a row, might change depending on the font used. Format is CharactersxRow (Ex: 10×5) |
| x-up-devcap-screenpixels | String, specifies the screen size in pixel. Format is WidthxHeight (Ex: 100×80) |
| x-up-devcap-immed_alert | Boolean, specific for Openwave |
| x-up-devcap-softkeysize | |
| x-up-devcap-msize | |
| x-up-devcap-screendepth | Integer, specifies the number of bits the screen can display |
| x-up-devcap-gui | Boolean, specifies if the device supports GUI extensions defined by Openwave for WML |
| x-up-devcap-gui | Boolean, specifies if the device supports GUI extensions defined by Openwave for WML |
More headers not prefixed with ‘devcap’.
| Header name | Description |
|---|---|
| x-up-wappush-secure | Boolean, specifies if the device supports secure wappush |
| x-up-wappush-unsecure | Boolean, specifies if the device supports non-secure wappush |
| x-up-wtls-info | String |
| x-up-bearer-type | String |
If configured the Openwave gateway might send you one of the following headers: * x-up-subno, a unique identifier for users. Depending on the configuration might be unique or limited to the user-session. * x-up-calling-line-id, this is the user’s full phone number
In most cases, to have these values set you will need to have an agreement with the mobile operator. Not all operators might be able to provide this information in this format through their gateway.
More headers get sometimes sent. These cover other non-WAP related features such as FAX.
These headers are specific of IEMobile. While they will not help you identify the device model uniquely, they will at least give you some hints as to what the device supports.
| Header name | Description |
|---|---|
| UA-pixels | {i.e. 240×320} |
| UA-color | {mono2 | mono4 | color8 | color16 | color24 | color32} |
| UA-OS | {Windows CE (POCKET PC) - Version 3.0} |
| UA-CPU | {i.e. ARM SA1110} |
| UA-Voice | {TRUE | FALSE} |
Source: IEMobile Team Weblog You can also find more information on this FAQ here:
Depending on the gateway, the browser and the operator, some other random headers might appear.
This is a rough list that might be useful: