device= or user agent

7 views
Skip to first unread message

mk

unread,
Mar 4, 2008, 5:02:50 PM3/4/08
to WHERE GPS Developers
Can we rely on the User-Agent header passed to
our HTTP server to tell us the correct device?

The "&device=" parameter (at least when running the N95NSTL
emulator) seems to match the actual device
on the first HTTP request (e.g. the first request
to hit my server when someone chooses my widget)
but then is based on the user account
on subsequent requests. Previous behavior, I think,
was to always send a value based on the user account.

Do you have a list of all the current User-Agent or
device= values we can expect to see? If so, is there a list
of what capabilities (screen sizes, font info, ...) those
devices have?

Thanks,
MK

Gil Cunningham

unread,
Mar 7, 2008, 12:36:03 PM3/7/08
to WHERE GPS Developers
Looking more thoroughly into your question.

But for now, "yes", the User-Agent passed is the correct device type.

Gil Cunningham

unread,
Mar 7, 2008, 1:37:01 PM3/7/08
to WHERE GPS Developers
MK-
What are you seeing on the first request vs subsequent requests ?

Also, I dont follow this ... "Previous behavior, I think,
was to always send a value based on the user account. "


On Mar 4, 5:02 pm, mk <mk3...@gmail.com> wrote:

mk

unread,
Mar 7, 2008, 2:41:30 PM3/7/08
to WHERE GPS Developers, mk3...@gmail.com
If I can trust the User-Agent, I'm all set, and none of the rest
matters,
except the question as to whether there's a list of all possible
values
and their capabilities. But here are more details if you want to go
further:

> What are you seeing on the first request vs subsequent requests ?

Here are two lines from my apache logs, where I've X'd out some fields
out of paranoia. I'm running the N95NSTL java code.

[07/Mar/2008:14:02:00 -0500] "GET /jin/index.cgi?device=Nokia
%20N95Mods&tz=GMT
%2d05%3a00&widgetid=XXX&widgetname=&deviceid=XXXX&carrier=XXXXX&lng=XX&lat=XXX&screenwidth=240&widgettype=0&wquery=null&wname=HeyWhatsThat
HTTP/1.1" 200 5073 "-" "Nokia N95Mods/Sprint/Version=2.1/Profile/
MIDP-2.0 Configuration/CLDC-1.0 UNTRUSTED/1.0"
[07/Mar/2008:14:02:11 -0500] "GET /jin/pan.cgi?
id=XXXXXX&random=0&deviceid=XXXXXX&carrier=XXXXX&device=Nokia
+N95&lng=XXXXX&lat=XXXXX&screenwidth=240&widgetid=XXXX&widgettype=0&wquery=null&wname=HeyWhatsThat
HTTP/1.1" 200 8923 "-" "Nokia N95Mods/Sprint/Version=2.1/Profile/
MIDP-2.0 Configuration/CLDC-1.0 UNTRUSTED/1.0"

The point is that "device=Nokia N95Mods" in the first request, which
comes when
the user picks my widget off the widget list, but "device=Nokia N95"
in the
second request, which is when my index.cgi page calls pan.cgi.

Notice that device= matches the User-Agent field (the final field on
each line)
in the first request, but not in the second. I believe from earlier
experiments
and conversations that the value shown on the second line comes from
the consumer account associated with the device, independent of the
characteristics
of the actual device.

> Also, I dont follow this ... "Previous behavior, I think,
> was to always send a value based on the user account. "

I think that at some point in the past, both requests used to show
the same device= value, but I can't be sure.

MK

Steve Klebanoff

unread,
Mar 14, 2008, 1:24:08 PM3/14/08
to WHERE GPS Developers
You can now find info about how the User Agent is constructed at
http://www.where.com/jin/screensizes.jin
Reply all
Reply to author
Forward
0 new messages