Welcome to WebmasterWorld Guest from

Forum Moderators: ocean10000

Message Too Old, No Replies

different info for different browsers

2:42 pm on Jun 30, 2010 (gmt 0)

Preferred Member

10+ Year Member

joined:Nov 24, 2005
votes: 0

Do you think this code is pretty solid, or would you recommend something else? It would happen on page load. I am just using the Response.write's as examples. Realistically, I would have blocks of code to execute.

<% If Request.Browser.Browser = "IE" Then
Response.Write("hello internet explorer")

ElseIf Request.Browser.Browser = "AppleMAC-Safari" Then

Response.Write("apple apple apple")

ElseIf Request.Browser.Browser = "Firefox" Then


end if

11:18 am on July 1, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 1, 2005
votes: 0

There was a discussion here about this a while back, you can get some more info here:

Browser detection in .NET [webmasterworld.com]
2:03 pm on July 1, 2010 (gmt 0)


WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month

joined:Jan 14, 2004
votes: 3

The code would work for those three browers but what about the other browsers out there?

I assume the browser statements are designed to handle the quirks for those browers.

[edited by: Ocean10000 at 3:04 am (utc) on Jul 2, 2010]

5:33 pm on July 1, 2010 (gmt 0)

Preferred Member

10+ Year Member

joined:Nov 24, 2005
votes: 0

I'd let the "Else" statement handle the others. I can see from our stats that these three browsers make up like 99.76% of our traffic. Most Linux users are on Firefox.

It's just specific content that would be displayed, versions won't matter.

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members