-
Notifications
You must be signed in to change notification settings - Fork 164
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 browser detected as Chrome. #113
Comments
I just tested your suggested change in Edge Version 110.0.1587.41 (Official build) (64-bit). The first part of the AND succeeded but the second part was false. I tried each part in the console, too:
You should also use this updated line:
|
I've updated the PR with your proposed changes, thank you David. About navigator.msSaveOrOpenBlob and navigator.msSaveBlob, it's just a copy of the existing code. I don't understand the origin of that part which is not commented. I'll remove it from my PR as you suggest. |
@johnrizzo4 I tried your PR, for macOS Monterey and Microsoft Edge Version 112.0.1722.68 (Official build) (x86_64); it's still showing as 'Chrome'. Should this be a proper case or maybe I'm doing something wrong? EDIT: For using your PR, I've done the following at my React project's package.json dependencies:
|
In this article from 2019, the Microsoft team explains why they replaced "Edge" by "Edg" in the userAgent string.
https://blogs.windows.com/msedgedev/2019/04/08/microsoft-edge-preview-channel-details/
Look for the subtitle "User Agent String"
getBrowserInfo..js is looking for "Edge" instead of "Edg" at line 3:
My suggested replacement:
This recent article shows similar code with "Edg": https://codepedia.info/detect-browser-in-javascript
I guess that this is why Edge is identified as Chrome by DetectRTC (since Edge also includes "Chrome" their string).
It's easy to see with https://www.webrtc-experiment.com/DetectRTC/ running from Edge as shown in this screenshot.
The text was updated successfully, but these errors were encountered: