Closed hafizulshaikh42 closed 1 year ago
It only doesn't work in Chrome based browsers. Works file in MS Edge and DuckDuckGo
Doesn't detect Chrome:
https://demo.mobiledetect.net/ shows:
This is a computer. Your UA is Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
Doesn't detect Safari:
This is a computer. Your UA is Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.5.2 Safari/605.1.15
Doesn't detect Firefox:
This is a computer. Your UA is Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/110.0
Doesn't detect Edge:
This is a computer. Your UA is Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.82
All is..
functions are false and isChrome()
, and isSafari()
, etc
@hafizulshaikh42 @Suleman-Elahi @photocoder the reason why it detects false
is because the library only looks for "mobile" versions of Chrome. The library is not meant to detect regular desktop versions.
Also see: https://github.com/serbanghita/Mobile-Detect/blob/3.74.x/docs/KNOWN_LIMITATIONS.md
Please specify the User-Agent. Go to https://demo.mobiledetect.net and copy-paste it here. This projects does not get proper value.