arasatasaygin / is.js

Micro check library
http://is.js.org
MIT License
9.16k stars 625 forks source link

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

Open bedis-elacheche opened 6 years ago

bedis-elacheche commented 6 years ago

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.

fslone-nomi commented 6 years ago

@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.

pikilipita commented 5 years ago

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.