| Author |
Detecting Firefox with request.servervariables("HTTP_USER_AGENT")
|
|
| Sharon 2005-06-07, 8:55 pm |
| Can I use request.servervariables("HTTP_USER_AGENT") to determine if the
user has Firefox or Internet Explorer? Is the return string differentiated
enough?
Thanks for any input.
| |
| Adrienne 2005-06-07, 8:55 pm |
| Gazing into my crystal ball I observed "Sharon" <sa@nospam.com> writing
in news:d84nsn014rb@news4.newsguy.com:
> Can I use request.servervariables("HTTP_USER_AGENT") to determine if
> the user has Firefox or Internet Explorer? Is the return string
> differentiated enough?
>
> Thanks for any input.
>
>
>
>
Quite different.
For IE: Mozilla/4.0 (compatible; MSIE 6.0 ...) ...being other things the
UA might have.
For Firefox: Gecko/20050511 Firefox/1.0.4
For Opera as Mozilla: Mozilla/5.0 (...) Opera 8.0 ... being OS
For Opera as IE: Mozilla/4.0 (compatible; MSIE 6.0;...) Opera 8.0
For Opera as Opera: Opera/8.0 (...)
The real question is, why do you need the UA string? Try not to do too
much browser sniffing because A) browsers can lie, like Opera; B) the UA
string can change; C) there are a lot of browsers out there and its
insane to try to test for all of them.
--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
| |
| Dave Anderson 2005-06-07, 8:55 pm |
| Sharon wrote:
> Can I use request.servervariables("HTTP_USER_AGENT") to determine
> if the user has...
No. I can direct my browser to send any UA string I want.
--
Dave Anderson
Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
|
|
|
|