Comments (3)
It only doesn't work in Chrome based browsers. Works file in MS Edge and DuckDuckGo
from mobile-detect.
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
from mobile-detect.
@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
from mobile-detect.
Related Issues (20)
- Samsung Tablets no longer detected HOT 4
- Version notes about 3.x on http://mobiledetect.net HOT 1
- Use getters (ie. getTabletDevices()) HOT 4
- Safari on iPad: completely incorrect reports HOT 1
- Trying to get in touch regarding a security issue HOT 2
- MD v 3.74 - PHP Parse error: syntax error, unexpected 'array' (T_ARRAY), expecting function (T_FUNCTION) or const (T_CONST) in Mobile_Detect.php on line 245 HOT 1
- How to check Desktop site setting On OR Off in mobile browser
- isMobile doesn't cache matches HOT 2
- isEdge() return false on Edge Browser
- 4.8.x HOT 4
- isMobile and IsTablet failing on ios devices - using safari HOT 1
- Port functionality from `jenssegers/agent` HOT 11
- Restore implicit use of `HTTP_USER_AGENT` in 4.8.x branch HOT 3
- Chrome's user agent reduction results in no longer detecting Android tablets as a tablet device HOT 1
- Getting a Parse error on the latest version (4.8.03) on PHP 7.1.33 HOT 4
- Google SERP links open as the mobile version HOT 5
- [bug] No user-agent has been set HOT 18
- [bug] breaking change pushed as patch HOT 3
- Need advice on `No valid user-agent has been set` PHP Fatal error HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mobile-detect.