1
votes

I'm trying to detect when a user is on Microsoft Edge. I have a Windows 10 install running on VirtualBox. When I use the developer tools in Edge's console to check the userAgent string, this is all it returns:

"Mozilla/5.0 (Windows NT 10.0; Win64; x64)"

With Internet Explorer 11 on the same Windows install, the console correctly reports this:

"Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; rv:11.0) like Gecko"

So why is Edge refusing to identify itself? Anyone run into this before?

2
On my system, it says 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.10532. - Uwe Keim

2 Answers

0
votes

It does identify itself. It should return much more info than what you posted. Are you sure you're using the latest MS Edge?

According to Microsoft documentation:

The Microsoft Edge for desktop in Windows 10 and RemoteIE builds is designed for maximum interoperability with other modern browsers and contemporary web content. It has the following user-agent string:

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.

Notice the Edge/12.(OS build number) at the end.

0
votes

Well, it seems I've fixed my own issue. I had to setup a new user account on Windows 10. After logging into the new account, Microsoft Edge now reports the userAgent string correctly:

"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.10240"

Bizarre issue. Hope this is helpful to anyone else who runs across this problem.