IE12's User-Agent is, unhelpfully:
Mozilla/5.0 (Windows NT 6.4; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.143 Safari/537.36 Edge/12.0
Unsurprisingly, this is currently recognized as Chrome 36.
The word "Trident" also doesn't appear any more, because IE12's
new layout engine is called "Edge". So look for that string instead.
Change-Id: I94a4ff2cc37ae6ce0c677ef92eeb6a2dff30c1f4
// Tanslations for conforming browser names
nameTranslations = [],
// Names of known layout engines
// Tanslations for conforming browser names
nameTranslations = [],
// Names of known layout engines
- layouts = ['gecko', 'konqueror', 'msie', 'trident', 'opera', 'webkit'],
+ layouts = ['gecko', 'konqueror', 'msie', 'trident', 'edge', 'opera', 'webkit'],
// Translations for conforming layout names
layoutTranslations = [ ['konqueror', 'khtml'], ['msie', 'trident'], ['opera', 'presto'] ],
// Names of supported layout engines for version number
// Translations for conforming layout names
layoutTranslations = [ ['konqueror', 'khtml'], ['msie', 'trident'], ['opera', 'presto'] ],
// Names of supported layout engines for version number
- layoutVersions = ['applewebkit', 'gecko', 'trident'],
+ layoutVersions = ['applewebkit', 'gecko', 'trident', 'edge'],
// Names of known operating systems
platforms = ['win', 'wow64', 'mac', 'linux', 'sunos', 'solaris', 'iphone'],
// Translations for conforming operating system names
// Names of known operating systems
platforms = ['win', 'wow64', 'mac', 'linux', 'sunos', 'solaris', 'iphone'],
// Translations for conforming operating system names
+ // And IE 12's different lies about not being IE
+ if ( name === 'chrome' && ( match = ua.match( /\bedge\/([0-9\.]*)/ ) ) ) {
+ name = 'msie';
+ version = match[1];
+ layout = 'edge';
+ layoutversion = parseInt( match[1], 10 );
+ }
// And Amazon Silk's lies about being Android on mobile or Safari on desktop
if ( match = ua.match( /\bsilk\/([0-9.\-_]*)/ ) ) {
if ( match[1] ) {
// And Amazon Silk's lies about being Android on mobile or Safari on desktop
if ( match = ua.match( /\bsilk\/([0-9.\-_]*)/ ) ) {
if ( match[1] ) {
+ // Internet Explorer 12
+ 'Mozilla/5.0 (Windows NT 6.4; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.143 Safari/537.36 Edge/12.0': {
+ title: 'Internet Explorer 12',
+ platform: 'WOW64',
+ profile: {
+ name: 'msie',
+ layout: 'edge',
+ layoutVersion: 12,
+ platform: 'win',
+ version: '12.0',
+ versionBase: '12',
+ versionNumber: 12
+ },
+ wikiEditor: {
+ ltr: true,
+ rtl: true
+ }
+ },
// Firefox 2
// Firefox 3.5
'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.19) Gecko/20110420 Firefox/3.5.19': {
// Firefox 2
// Firefox 3.5
'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.19) Gecko/20110420 Firefox/3.5.19': {