0

On the iPad (2+) The Chrome browser (which is a wrapper around the native Safari browser AFAIK) does not fire some events (such as when the user closes the browser). This leads to false positive "app has crashed" reporting.

So we'd like to filter out users who are using Safari from some sort of wrapper.

Is there any way to detect that (relatively easily)?

Stack: PhP, .JS, jQuery

1
  • Take a look at the User Agent string.
    – zaph
    Commented Aug 14, 2015 at 22:13

1 Answer 1

1

You can acces such information via the browser's User Agent (UA) string. Try and have a look at this: https://developer.chrome.com/multidevice/user-agent

According to that, the Safari users could be filtered out with:

if(navigator.userAgent.match('Version')) {
    // Insert logic here 
}

Whereas Chrome for iOS users could be filtered out with:

if(navigator.userAgent.match('CriOS')) {
    // Insert logic here 
}

Not the answer you're looking for? Browse other questions tagged or ask your own question.