arouel / uadetector

UADetector is a library to identify over 190 different desktop and mobile browsers and 130 other User-Agents like feed readers, email clients and multimedia players. In addition, even more than 400 robots like BingBot, Googlebot or Yahoo Bot can be identified.
http://uadetector.sourceforge.net/
Apache License 2.0
246 stars 100 forks source link

Wrong detection for IE11 & EDGE #131

Open ankitwasankar opened 8 years ago

ankitwasankar commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

@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 commented 8 years ago

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

HaraldWalker commented 8 years ago

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

Lemongrass3110 commented 8 years ago

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 commented 8 years ago

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

skarapatakis commented 7 years ago

Does anyone know if this will get fixed?

Lemongrass3110 commented 7 years ago

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

HaraldWalker commented 5 years ago

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 commented 5 years ago

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.