It seems there is no real standard for specifying "screen-size" in a http header from a user agent.
For example, the two headers below:
X-UP-devcap-screenpixels: 320x240
or
UA-pixels: 320x240
are two commonly used headers. The second is used by Windows Mobile devices mostly. The X-UP looks like it comes from the UP browser gateway.
Another option is
X-Screen-Width: 320
X-Screen-Height: 240
the X-Screen-Width might be made a up header.
My question is:
What is a good standard to adopt on our "transcoder" going forward? It's not really a full web browser, but is mostly for limited sites. But it should be the standard that would be adopted by Opera Mini/GWT etc.
Neither Opera Mini nor Google Web Transcoder sends this information through in their HTTP requests. I guess they expect the site to look up the phone model, and thereby the screen width and height, on the server side.
I actually found this RFC 4229 called HTTP Header Field Registrations. It's kind of outdated, and a mission to contribute fixes to.
If I had to see what's used mostly in the field, I would probably end up going with "UA-Pixels".
Some more references
- Some devices (mostly Windows Mobile again) have a 320x240 value in the user-agent header