DevTools icon indicating copy to clipboard operation
DevTools copied to clipboard

Emulated devices get Edg appended to their user agent when dev tools are opened

Open XLeapZan opened this issue 1 year ago • 3 comments

I'm using Edge 124.0.2478.51, any custom user agent added to the device simulator gets 'Edg/124.0.0.0' appended to its user agents when the dev tools are reopened.

Steps to reproduce:

  • Open DevTools
  • Enable device emulation
  • Add a custom device and specify a user agent. Don't specify Edg anywhere in the string)
  • Close DevTools
  • Reopen DevTools
  • Verify custom device

Current behavior:

  • the user agent has been changed and Edg/124.0.0.0 has been appended (this happens to all custom user agents that don't already have Edg in their string)

Expected:

  • The user agent of custom devices will remain unchanged.

P.S. This also happens to the built-in device user agents. I suppose you could argue that it should emulate Edge on those devices, but then I would then expect, for example, for an 'iPad Mini' to say 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15 EdgiOS/124.0.0.0' but it still appends 'Edg/124.0.0.0'.

AB#50298790

XLeapZan avatar Apr 24 '24 07:04 XLeapZan

Thanks for the report. I've tested this just now and can reproduce the issue locally. I will put this on our dev team's backlog.

captainbrosset avatar Apr 24 '24 08:04 captainbrosset