uadetector icon indicating copy to clipboard operation
uadetector copied to clipboard

Wrong detection for IE11 & EDGE

Open ankitwasankar opened this issue 8 years ago • 11 comments

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

ankitwasankar avatar Jul 18 '16 10:07 ankitwasankar

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.

bseib avatar Jul 26 '16 19:07 bseib

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.

danny-wu avatar Jul 28 '16 00:07 danny-wu

@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.

bseib avatar Jul 29 '16 18:07 bseib

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

ankitwasankar avatar Jul 30 '16 12:07 ankitwasankar

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

HaraldWalker avatar Jul 31 '16 17:07 HaraldWalker

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 avatar Oct 10 '16 13:10 Lemongrass3110

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

Lemongrass3110 avatar Oct 10 '16 13:10 Lemongrass3110

Does anyone know if this will get fixed?

skarapatakis avatar Jul 20 '17 12:07 skarapatakis

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

Lemongrass3110 avatar Jul 20 '17 13:07 Lemongrass3110

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.

HaraldWalker avatar Jan 21 '19 14:01 HaraldWalker

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.

godenji avatar Jan 22 '19 00:01 godenji