New Edge Insider browser can change user agent strings based on what website you’re visiting

Kip Kniskern

Microsoft Edge app on ios

One of Microsoft’s biggest reasons for making the switch from EdgeHTML as a rendering engine to Chromium has been that certain sites just don’t work well in Edge. Other sites, however, especially video focused properties like Netflix and HBONow, because of the way the old Edge handles PlayReady DRM video content, work better in Edge.

In order to get the best of both worlds, according to BleepingComputer.com, the New Edge can change user agent strings, the bits of code that tell a website what browser a visitor is using, based on a .json file that the new browser downloads from Microsoft when the new Edge fires up. A section of that json file, which you can see by visiting

https://config.edge.skype.com/config/v1/Edge/75.0.131.0?osname=win&channel=dev&clientId=[id]&osver=10.0.18875&osarch=x86_64&osring=WIF&osedition=professional&ostelemetrylevel=full

from a new Edge session (BleepingComputer says this is for the Canary Channel, but we were able to return the .json using Edge Dev), contains a section called EdgeDomainActions. There, the file will identify certain websites, and set the user agent string based on preset domain names. For example, once the user agent string policies are set, applications can be named and the user agent changed from ChromeUA to EdgeUA:

{  
   "EdgeDomainActions":{  
      "user_agent_override":{  
         "version":1,
         "policies":[  
            {  
               "name":"EdgeUA",
               "type":"partialReplacement",
               "value":"AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/18.17763"
            },
            {  
               "name":"ChromeUA",
               "type":"edgeTokenReplacement",
               "value":""
            }
         ],
         "applications":[  
            {  
               "domain":"netflix.com",
               "applied_policy":"EdgeUA"
            },
            {  
               "domain":"facebook.com",
               "applied_policy":"ChromeUA"
            },

and so on. This way, the new Edge can serve up PlayReady DRM features to sites like Netflix using the Edge user agent string, and perhaps better performance and fewer glitches for other sites, like Facebook.com, by mimicing the Chrome user agent string.

Microsoft as of yet hasn’t released a lot of documentation on how the new Edge will work, or in fact even gotten around to posting changelogs for Dev and Canary builds, but we expect to hear lots more about exactly how Edge/Chromium will work, beginning at Build in just a couple of weeks.