Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IE11 userAgent() doesn't return 'IE' #94

Closed
virtualbjorn opened this issue Jul 24, 2019 · 3 comments
Closed

IE11 userAgent() doesn't return 'IE' #94

virtualbjorn opened this issue Jul 24, 2019 · 3 comments

Comments

@virtualbjorn
Copy link

Issue

[x] I've read above note and I'm quite sure I have a real issue with mobile-detect.js

Here's the userAgent string

Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729; Tablet PC 2.0; rv:11.0) like Gecko

I tried using the mobile-detect.min.js and failed to get userAgent(), it is just empty.

@hgoebl
Copy link
Owner

hgoebl commented Jul 24, 2019

I suppose you haven't used the library as intended/documented.
Please send the code where you instantiate (new) MobileDetect.

@virtualbjorn
Copy link
Author

virtualbjorn commented Jul 24, 2019

var mobileDetect = new MobileDetect(window.navigator.userAgent);
console.log(mobileDetect.userAgent()); // returns empty
console.log(mobileDetect.userAgents()); // returns [] also empty

btw, I'm using mobile-detect.min.js

@hgoebl
Copy link
Owner

hgoebl commented Jul 24, 2019

this library works only for mobile environments.
Most info (like userAgent) target mobile browsers.

See also #73

@hgoebl hgoebl closed this as completed Jul 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants