Click here to Skip to main content
15,356,641 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
I want to get the name of the browser in which the client has opened my web page.

When i use the Header: User-Agent to fetch information. I get the following---
For Google Crome i got this header --- Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.634.0 Safari/534.16

For IE i got this--- Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET4.0C; .NET4.0E; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)

I just simply wants to fetch the name of the client browser so that i can display it on my web page that "you are using so so browser".

My 5 for this Question: it makes sense and can be used to overcome lack of compatibility in browsers or cut out some functionality not supported by some browsers, implement fall-back behavior.

1 solution

Here[^] is an article that can help you.
Rahul_Patel 1-May-11 7:19am
The updated file still doesnt identify Google Crome.. It names it as Apple Safari.....
Rahul, nothing can help: any Browser can impersonate any other one. By some reasons, this is pretty usual: others of one Browser show "compatibility" with another one in this way...

d@anish gets my 5 for this answer.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900