Open ankitwasankar opened 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.
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 @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 Yeah. Chrome user-agents don't have rv revision token to indicate version and never contain Edge in it's user-agent.
Wrong detection is database related. Which version of the user agent database are you using?
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.
This issue is possibly also related to issue #116 and pull request #120.
Does anyone know if this will get fixed?
This project seems pretty dead - best way might be to fork it and merge #120 in your fork.
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.
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.
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