Sign In | Register Now About Bytes | Help | Site Map
Connecting Tech Pros Worldwide

Browsers

Question posted by: Paulo (Guest) on August 6th, 2008 03:05 PM
Can asp detect what browser the user is running? Any fix should be done for
each one?


Mike Brind [MVP]'s Avatar
Mike Brind [MVP]
Guest
n/a Posts
August 6th, 2008
06:35 PM
#2

Re: Browsers

"Paulo" <eris_paulo@terra.com.brwrote in message
news:uqwLIQ99IHA.4916@TK2MSFTNGP02.phx.gbl...
Quote:
Can asp detect what browser the user is running? Any fix should be done
for each one?
>


Yes. Request.ServerVariables(" HTTP_USER_AGENT") will get the browser
details. No fix is required for ASP, as it is processed on the web server,
and is not affected by the browser.

--
Mike Brind
MVP - ASP/ASP.NET



Tim Slattery's Avatar
Tim Slattery
Guest
n/a Posts
August 6th, 2008
08:05 PM
#3

Re: Browsers
"Mike Brind [MVP]" <paxtonend@hotmail.comwrote:
Quote:
>
>"Paulo" <eris_paulo@terra.com.brwrote in message
>news:uqwLIQ99IHA.4916@TK2MSFTNGP02.phx.gbl...
Quote:
>Can asp detect what browser the user is running? Any fix should be done
>for each one?

Quote:
>Yes. Request.ServerVariables(" HTTP_USER_AGENT") will get the browser
>details. No fix is required for ASP, as it is processed on the web server,
>and is not affected by the browser.


But bear in mind that the USER_AGENT string can be forged. There's no
way to be 100% sure of the client browser.

--
Tim Slattery
MS MVP(Shell/User)
Join Bytes!
http://members.cox.net/slatteryt

Adrienne Boswell's Avatar
Adrienne Boswell
Guest
n/a Posts
August 6th, 2008
08:16 PM
#4

Re: Browsers
Gazing into my crystal ball I observed "Paulo" <eris_paulo@terra.com.br>
writing in news:uqwLIQ99IHA.4916@TK2MSFTNGP02.phx.gbl:
Quote:
Can asp detect what browser the user is running? Any fix should be
done for each one?
>
>


As Mike said, HTTP_USER_AGENT - and if your markup is well formed, you
should not have to do browser sniffing (yuk!).

Please be aware, also, that some UAs will say they are something else,
Opera and IIRC Firefox can both change their string on the fly.
Additionally, what about new browsers and newer versions of current
browsers. That way madness lies.

Here's something I really hate - "You browser is not supported by this
web site. You need at least Internet Explorer 5, or Netscape to view
this site". I am using Opera 9.51 - waaaayyy past IE5 and Netscape -
Paaleeeze!

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share


 
Not the answer you were looking for? Post your question . . .
189,759 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

Latest Articles: Read & Comment
  • Didn't find the answer you were looking for?
    Post Your Question
  • Top Community Contributors