Skip to content
This repository has been archived by the owner on Jan 28, 2023. It is now read-only.

Wrong detection for IE11 & EDGE #131

Open
ankitwasankar opened this issue Jul 18, 2016 · 11 comments
Open

Wrong detection for IE11 & EDGE #131

ankitwasankar opened this issue Jul 18, 2016 · 11 comments

Comments

@ankitwasankar
Copy link

ankitwasankar commented Jul 18, 2016

For IE11 string (Windows 10) - It says Chrome
Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko

For EDGE string(Windows 10) - It says Mozilla
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586

@bseib
Copy link

bseib commented Jul 26, 2016

User-Agent string begins with "Mozilla" for historical reasons, going back to the early browser days when IE was first released, and it was spoofing the UserAgent string to say "Mozilla" (referring the very first web browser).

The two AU strings you cite above are indeed correct for those two browsers.

This issue should be closed.

@danny-wu
Copy link

I think what @ankitwasankar may be asking is for IE11 on Win 10 to be detected as IE11, and EDGE on Win 10 to be detected as EDGE.

@bseib
Copy link

bseib commented Jul 29, 2016

@danny-wu @ankitwasankar my mistake.

I didn't find either of those UA strings in the uas.xml data file, which is over a year old: https://github.com/before/uadetector/blob/master/modules/uadetector-resources/src/main/resources/net/sf/uadetector/resources/uas.xml

Without digging into the source code too much, I'm guessing there must some heuristic to assign a browser when the UA string is not in the known list. So I reverse my position; carry on with the issue open.

@ankitwasankar
Copy link
Author

ankitwasankar commented Jul 30, 2016

@bseib Yeah. Chrome user-agents don't have rv revision token to indicate version and never contain Edge in it's user-agent.

@HaraldWalker
Copy link
Contributor

Wrong detection is database related. Which version of the user agent database are you using?

@Lemongrass3110
Copy link

https://msdn.microsoft.com/en-en/library/hh869301(v=vs.85).aspx

This is a microsoft produced issue. Hopefully those could be added to the database.

@Lemongrass3110
Copy link

This issue is possibly also related to issue #116 and pull request #120.

@skarapatakis
Copy link

Does anyone know if this will get fixed?

@Lemongrass3110
Copy link

This project seems pretty dead - best way might be to fork it and merge #120 in your fork.

@HaraldWalker
Copy link
Contributor

With UAS database version 20190121-02 it reports both user agents correctly.
Edge support was added to this library in 2015.
I think this issue can be closed.

@godenji
Copy link
Collaborator

godenji commented Jan 22, 2019

With UAS database version...

IIRC, the reason that Andre, the creator of UADetector, stopped working on this project was due to UAS no longer providing the database to open source projects (i.e. UAS is subscription based now). AFAIK, unless UAS has changed their business model, UADetector still needs to use the open source database, which is now several years old.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants