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

Edge user agent is detected as Chrome #1318

Closed
mimmi20 opened this issue Mar 28, 2017 · 2 comments · Fixed by #1329
Closed

Edge user agent is detected as Chrome #1318

mimmi20 opened this issue Mar 28, 2017 · 2 comments · Fixed by #1329
Assignees
Milestone

Comments

@mimmi20
Copy link
Member

mimmi20 commented Mar 28, 2017

see ua-parser/uap-core#233 for more details.

@jaydiablo
Copy link
Contributor

This gets parsed as Chrome because there is no "." after the Major Version. The other edge agents in the test suite look like this:

Mozilla/5.0 (Windows NT 10.0; Win64; x64; Xbox; Xbox One) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14393

vs. the one from that ticket:

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12

And the pattern is:

Mozilla/5.0 (#PLATFORM#) applewebkit* (*khtml*like*gecko*) Chrome/* Safari/* Edge/#MAJORVER#.*

According to Microsoft, the Windows build number should always follow the Edge version: https://msdn.microsoft.com/en-us/library/hh869301(v=vs.85).aspx

@mimmi20
Copy link
Member Author

mimmi20 commented Mar 28, 2017

We could remove the "." from the pattern.

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

Successfully merging a pull request may close this issue.

2 participants