Windows edge user agent

Microsoft Edge User Agent String (Desktop)

A user agent (UA) string is able to be used to detect what version of a specific browser is being used on a certain operating system. Like other browsers, Microsoft Edge includes this information in the User-Agent HTTP header whenever it makes a request to a site. It may also be accessed via JavaScript by querying the value of navigator.userAgent .

Microsoft recommends that web developers make use of feature detection whenever possible to improve code maintainability, reduce code fragility, and eliminate the risk of code breakage in the event of future UA string updates.

For cases where feature detection is not applicable and UA detection must be used, the format of the Microsoft Edge UA on desktop is as follows:

The User-Agent request header is in the following format:

The return value from navigator.userAgent is in the following format:

Platform identifiers change based on the operating system being used, and version numbers also increment as time passes. This format is the same as the Chromium UA with the addition of a new Edg token at the end. Microsoft selected the Edg token to avoid compatibility issues that may be caused by using the string Edge , which is used by the version of Microsoft Edge based on EdgeHTML. The Edg token is also consistent with existing tokens used on iOS and Android.

Mapping UA String to Browser Name

Mapping UA string tokens to a more human-readable browser name for use in code is a common pattern on the web today. When mapping the new Edg token to a browser name, Microsoft recommends using a different name than the one developers used for the legacy version of Microsoft Edge to avoid accidentally applying any legacy workarounds that are not applicable to Chromium-based browsers.

User Agent Overrides

Sometimes, a website does not recognize the updated version of the Microsoft Edge UA. As a result, a set of the features of that website may not work correctly. When Microsoft is notified about these types of issues, website owners are contacted and informed about the updated UA.

The sites often need some time to update and test the UA detection logic to address the issues that Microsoft reports to site owners. In these cases, Microsoft uses a list of UA overrides in our Beta and Stable channels to maximize compatibility for users who access these sites. The overrides specify new UA values that Microsoft Edge should send instead of the default UA for specific sites. You are able to view the list of UA overrides that are currently being applied by navigating to edge://compat/useragent in the Beta and Stable channels of Microsoft Edge.

Our Canary and Dev channels do not currently receive UA overrides so that web developers have an environment where they can easily reproduce issues on their sites that are caused by the default Microsoft Edge UA. If for some reason you require the ability to disable UA overrides in the Beta or Stable channels of Microsoft Edge, you may run the Microsoft Edge executable using the following command line argument:

Microsoft Edge на Chromium может изменять User-Agent автоматически, улучшая совместимость с веб-сайтами

Новый Edge построен на кодовой базе Chromium, а это значит, что браузер может распознаваться как Chromium, что обеспечит такой же уровень совместимости с сайтами и веб-приложениями, как и в Google Chrome.

Читайте также:  Windows 10 manager hosts

Microsoft Edge сможет также идентифицироваться как Microsoft Edge на определенных сайтах. Одна из главных причин данного поведения связана с улучшенной поддержкой потоковой передачи медиаконтента на таких сайтах, как Netflix.

Там, где пользователи Chrome смогут воспроизводить только FullHD потоки Netflix (1080p), пользователи Microsoft Edge смогут наслаждаться картинкой качеством до 4K.

Это очень серьезное различие, и одно из главных преимуществ Microsoft Edge. Обновленный Edge на Chromium также получит не только технологию Widevine от Google, но и собственное DRM-решение Microsoft для воспроизведения коммерческих мультимедийных потоков в высоком качестве.

Сайт Bleeping Computer сообщает, что новый Edge на Chromium регулярно загружает JSON файл с сервера config.edge.skype.com, который сопоставляет определенные домены с соответствующими значениями User-Agent.

Когда пользователь попытается подключиться к одному из сайтов, упомянутых в конфигурационном файле, например netflix.com или hbonow.com, Microsoft Edge применит User-Agent, который назначен сайту в файле JSON.

В случае со стриминговыми сервисами, браузер идентифицируется как классический Edge:

Для Facebook и Messenger, Edge определяется как Google Chrome:

Для большинства сайтов используется user-agent по умолчанию:

Отдельная секция в файле JSON переопределяет доступность плагинов DRM. Edge может ограничить доступ к одному из поддерживаемых плагинов DRM на некоторых сайтах. Сейчас такое поведение настроено для CBS, Shudder, TVnow, Bitmovin и Sling. На этих ресурсах будет использоваться только Google Widevine.

Дополнительное преимущество

Microsoft не опубликовала ни одной статьи или заметки о возможности изменения user-agent в новом Edge. Наиболее вероятные объяснения внедрения функции – соображения совместимости и функциональности. Microsoft использует директиву user-agent классического Edge для разблокировки высококачественных потоков на некоторых сайтах с передачей мультимедиа в высоком качестве, user-agent Google Chrome для получения дополнительных преимуществ и user-agent по умолчанию на большинстве сайтов.

Автоматическое переключение значений user-agent является еще одним преимуществом Microsoft Edge над Google Chrome.

А вы уже успели протестировать новый Edge? Какие впечатления на вас произвел браузер?

Строка агента пользователя Microsoft EDGE (классическое приложение) Microsoft Edge User Agent String (Desktop)

Строку агента пользователя (UA ) можно использовать для определения версии определенного браузера, используемой в определенной операционной системе. A user agent (UA) string is able to be used to detect what version of a specific browser is being used on a certain operating system. Как и другие браузеры, Microsoft Edge включает эти сведения в User-Agent заголовок HTTP при запросе к сайту. Like other browsers, Microsoft Edge includes this information in the User-Agent HTTP header whenever it makes a request to a site. Кроме того, доступ к нему можно получить с помощью JavaScript, заполнив запрос значения navigator.userAgent . It may also be accessed via JavaScript by querying the value of navigator.userAgent .

Корпорация Майкрософт рекомендует, чтобы веб-разработчики использовали Обнаружение компонентов , когда это возможно, для улучшения поддержки кода, сокращения кода fragility и устранения риска нарушения кода в случае будущих обновлений строк в ходе работы с агентом. Microsoft recommends that web developers make use of feature detection whenever possible to improve code maintainability, reduce code fragility, and eliminate the risk of code breakage in the event of future UA string updates.

Для случаев, когда обнаружение функций неприменимо и необходимо использовать обнаружение пользователей, формат Microsoft Edge UA на компьютере может выглядеть следующим образом: For cases where feature detection is not applicable and UA detection must be used, the format of the Microsoft Edge UA on desktop is as follows:

User-Agent Заголовок запроса имеет следующий формат: The User-Agent request header is in the following format:

Возвращаемое значение navigator.userAgent в следующем формате: The return value from navigator.userAgent is in the following format:

Идентификаторы платформы изменяются в зависимости от используемой операционной системы, а номера версий также изменяются по мере прохождения времени. Platform identifiers change based on the operating system being used, and version numbers also increment as time passes. Этот формат такой же, как и Chromium UA, с добавлением нового Edg маркера в конце. This format is the same as the Chromium UA with the addition of a new Edg token at the end. Корпорация Майкрософт выбрала Edg маркер, чтобы избежать проблем с совместимостью, которые могут возникать при использовании строки Edge , которая используется в версии Microsoft EDGE на основе EdgeHTML. Microsoft selected the Edg token to avoid compatibility issues that may be caused by using the string Edge , which is used by the version of Microsoft Edge based on EdgeHTML. Edg Маркер также согласовывается с существующими маркерами, используемыми в iOS и Android. The Edg token is also consistent with existing tokens used on iOS and Android.

Читайте также:  Можно ли пользоваться линуксом

Сопоставление строки UA с именем браузера Mapping UA String to Browser Name

Сопоставление маркеров строки UA с более удобным для чтения именем браузера для использования в коде — это распространенный шаблон в Интернете уже сегодня. Mapping UA string tokens to a more human-readable browser name for use in code is a common pattern on the web today. При сопоставлении нового Edg маркера с именем браузера Корпорация Майкрософт рекомендует использовать другое имя, отличное от того, что используется в устаревшей версии Microsoft EDGE, чтобы избежать случайного применения устаревших решений, неприменимых для браузеров на базе Chromium. When mapping the new Edg token to a browser name, Microsoft recommends using a different name than the one developers used for the legacy version of Microsoft Edge to avoid accidentally applying any legacy workarounds that are not applicable to Chromium-based browsers.

Переопределение агента пользователя User Agent Overrides

Иногда веб-сайт не распознает обновленную версию Microsoft Edge UA. Sometimes, a website does not recognize the updated version of the Microsoft Edge UA. В результате набор функций этого веб-сайта может работать неправильно. As a result, a set of the features of that website may not work correctly. Если корпорация Майкрософт уведомляет об этих типах проблем, обратитесь к владельцам веб-сайта и сообщите о нем обновленный агент. When Microsoft is notified about these types of issues, website owners are contacted and informed about the updated UA.

Сайтам часто приходится обновлять и тестировать логику обнаружения UA для устранения проблем, которые корпорация Майкрософт предоставляет владельцам сайтов. The sites often need some time to update and test the UA detection logic to address the issues that Microsoft reports to site owners. В этих случаях корпорация Майкрософт применяет список переопределений агента пользователя в наших бета-версиях и стабильных каналах для максимального обеспечения совместимости пользователей, которые имеют доступ к этим сайтам. In these cases, Microsoft uses a list of UA overrides in our Beta and Stable channels to maximize compatibility for users who access these sites. Переопределение задает новые значения агента доменных данных, которые должны отправляться Microsoft EDGE, а не по умолчанию для определенных сайтов. The overrides specify new UA values that Microsoft Edge should send instead of the default UA for specific sites. Вы можете просмотреть список переопределений агента пользователя, которые в данный момент применяются, перейдя edge://compat/useragent в бета-и стабильные каналы Microsoft Edge. You are able to view the list of UA overrides that are currently being applied by navigating to edge://compat/useragent in the Beta and Stable channels of Microsoft Edge.

Наши каналы Канарские и dev в настоящее время не получают переопределения агента пользователя, чтобы веб-разработчики могли легко воспроизводить проблемы на сайтах, вызванные по умолчанию Microsoft Edge UA. Our Canary and Dev channels do not currently receive UA overrides so that web developers have an environment where they can easily reproduce issues on their sites that are caused by the default Microsoft Edge UA. Если по какой-либо причине вам требуется возможность отключить переопределения UA в бета или стабильных каналах Microsoft EDGE, вы можете запустить исполняемый файл Microsoft Edge с помощью следующего аргумента командной строки: If for some reason you require the ability to disable UA overrides in the Beta or Stable channels of Microsoft Edge, you may run the Microsoft Edge executable using the following command line argument:

Читайте также:  Linux find so dependencies

What is the User Agent string name for Microsoft Edge?

I’m making a website and I want it to be compatible with the forthcoming Microsoft Edge when it comes out officially. To be more specific, the mobile version of it. Does anyone know what string will identify the Edge Mobile Browser (for example, «IE Mobile» identifies the mobile version of the Internet Explorer).

10 Answers 10

Microsoft Edge UA string:

Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10136

Neowin recently reported that Microsoft’s new browser for Windows 10, Spartan, uses the Chrome UA string, “Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0″. That is done on purpose.

You’ll also notice that the entire string ends with “Edge/12.0″, which Chrome does not.

I should point out, that this isn’t a radical departure from what Microsoft did with IE 11, which on Windows 8 reads: Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko, as explained in this post.

What is User Agent sniffing?

Often, web developers will UA sniffing for browser detection. Mozilla explains it well on their blog:

Serving different Web pages or services to different browsers is usually a bad idea. The Web is meant to be accessible to everyone, regardless of which browser or device they’re using. There are ways to develop your web site to progressively enhance itself based on the availability of features rather than by targeting specific browsers.

Often, lazy developers will just sniff for the UA string and disable content on their website based on which browser they believe the viewer is using. Internet Explorer 8 is a common point of frustration for developers, so they will frequently check if a user is using ANY version of IE, and disable features.

All user agents strings contain more information about other browsers than the actual browser you are using – not just tokens, but also ‘meaningful’ version numbers.

Internet Explorer 11’s UA string:

Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko

Microsoft Edge UA string:

Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10136

The userAgent property has been aptly described as “an ever-growing pack of lies” by Patrick H. Lauke in W3C discussions. (“or rather, a balancing act of adding enough legacy keywords that won’t immediately have old UA-sniffing code falling over, while still trying to convey a little bit of actually useful and accurate information.”)

We recommend that web developers avoid UA sniffing as much as possible; modern web platform features are nearly all detectable in easy ways. For example, the Modernizr library is a fantastic and simple way of detecting features.

Over the past year, we’ve seen some UA-sniffing sites that have been updated to detect Microsoft Edge… only to provide it with a legacy IE11 code path. This is not the best approach, as Microsoft Edge matches ‘WebKit’ behaviors, not IE11 behaviors (any Edge-WebKit differences are bugs that we’re interested in fixing).

In our experience Microsoft Edge runs best on the ‘WebKit’ code paths in these sites. Also, with the internet becoming available on a wider variety of devices, please assume unknown browsers are good – please don’t limit your site to working only on a small set of current known browsers. If you do this, your site will almost certainly break in the future.

Conclusion

By presenting the Chrome UA string, we can work around the hacks these developers are using, to present the best experience to users.

Оцените статью