0

I have to get current browser name & version of client browser. I am using Request.Browser.Browser for Browser Name and Request.Browser.MajorVersion for Browser version.

This is working good for all browsers except for chrome on iPad, where it shows Browser Name as Safari and version 0.

Any resolution for chrome on iPad?

Pranav Singh
  • 17,079
  • 30
  • 77
  • 104

2 Answers2

1
string agent = Request.UserAgent.ToString().ToLower() 

Use the above to get all the browser and device information. You will see crios with the version number mentioned. That is the only way I have found to identify Chrome on iPad.

Esoteric Screen Name
  • 6,082
  • 4
  • 29
  • 38
Abhi Dasu
  • 21
  • 1
1

I had the same issue and added a check of the User Agent string for 'CriOS', which I found mentioned in a related question.

Request.UserAgent != null && Request.UserAgent.IndexOf("crios", StringComparison.OrdinalIgnoreCase) > -1)

You could probably also use the index of 'CriOS' to get the version number that follows it in the user agent string.

Community
  • 1
  • 1
chadwilcomb
  • 113
  • 5