Click to See Complete Forum and Search --> : Operating System


ldoodle
08-18-2006, 04:04 AM
Hi there,

How can I show what OS visitors are using?

Thanks/...

ahk2chan
08-18-2006, 07:15 AM
You can use:

request.servervariables("HTTP_USER_AGENT")

It will include the OS information in it.

Terrorke
08-18-2006, 08:02 AM
You can use:

request.servervariables("HTTP_USER_AGENT")

It will include the OS information in it.

HTTP_USER_AGENT returns a string describing the browser used to send the request.

HTTP_UA_OS returns a string stating the operating system of the user agent.
But it seems not to work all the time.

ahk2chan
08-18-2006, 09:25 AM
I have created a test page and I have tried to hit this page with:
1. my PC IE 6.0
2. my PC Firefox 1.5
3. my ibook Safari
and all return empty for HTTP_UA_OS

But I understand that there could be issue with HTTP_USER_AGENT since it returns something like:
"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6"

So you have to parse out the "Windows NT 5.1" in there.