arasatasaygin/is.js

Both is.safari() and is.chrome() returns true for facebook inapp browser

bedis-elacheche opened this issue · 2 comments

Hi,
I got an issue with browser detection features.
I used the following user agent string: Mozilla/5.0 (Linux; Android 7.0; SM-G930F Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/67.0.3396.87 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV;]

Both methods is.safari() and is.chrome() are returing true for the same user agent.

@bedis-elacheche Yeah currently both of those methods are using User Agent sniffing and aren't very reliable. I'll work on improving it and submit a pull request, in the meantime you'll have to depend on duck typing to make it more reliable.

That would be a great addition,
the same issue is happening within Skype mobile app:
it's tough to find out if a page it open within Skype inapp browser or within a real browser.