With Internet Explorer 11, you get better compatibility with web standards, other browsers, and real-world websites. There’s updated support for popular web standards and changes that prevent older websites from displaying incorrectly.
The user-agent string for Internet Explorer 11 is shorter than previous versions and has some interesting changes.
IE 11 user-agent string: Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv 11.0) like Gecko IE 10 user-agent string (on Windows 7): Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0) The compatible ("compatible") and browser ("MSIE") tokens have been removed. The "like Gecko" token has been added (for consistency with other browsers). The version of the browser is now reported by a new revision ("rv") token.
The most glaring difference is the removal of the “MSIE” token, which has been part of the Internet Explorer user-agent from the beginning. Also noticeable is the addition of “like Gecko” at the end. This suggests that Internet Explorer would prefer to be identified as a Gecko-type browser if it’s not identified as itself. Safari was the first browser to add “like Gecko” so that anyone sniffing for “Gecko” in the user-agent string would allow the browser through.
Any sniffing code that looks for “MSIE” now will not work with the new user-agent string. You can still search for “Trident” to identify that it’s Internet Explorer (the “Trident” token was introduced with Internet Explorer 9). The true Internet Explorer version now comes via the “rv” token.
Legacy API additions, changes, and removals
Many websites look for browsers that support legacy (HTML4) features in order serve experiences optimized for earlier browsers. This can be a problem for browsers that support legacy features and modern standards, such as HTML5, CSS3, and so on. If a site detects legacy features before searching for modern standard support, it can serve legacy experiences to browsers that support modern standards and richer experiences.
As a result, IE11 adds, changes, and removes a number of legacy features by default:
=> The navigator.appName property now returns “Netscape” to reflect the HTML5 standard and to match behavior of other browsers.
=> The navigator.product property now returns “Gecko” in order to reflect the HTML5 standard and to match behavior of other browsers.
=> The XDomainRequest object is replaced by CORS for XMLHttpRequest.
=> Supported for __proto__ has been added.
=> The dataset property has been added.
In addition, several legacy API features have been removed in favor of features specified by modern standards:
Removed API feature Replacement feature
window.doScroll window.scrollLeft, window.scrollTop
document.fileSize, img.fileSize Use XMLHttpRequest to fetch the source
document.createStyleSheet dcument.createElement (“style”) style.styleSheet style.sheet
window.createPopup Use div or iframe with a high zIndex value
Binary behaviors Varies; use a standards-based equivalent,ie canvas, SVG, or CSS3 Animations
Legacy data binding Use data binding from a framework, such as WinJS
URL character encoding
IE11 changes the character encoding for URLs. Specifically, query strings and XHR requests are now encoded using UTF-8 character encoding.
This change affects all URLs except for:
anchor name components (also called fragments). username and password components. file:// or ftp:// protocol links.
These changes match the behavior of other browsers and simplifies cross-browser XHR code.
Custom data attributes
IE11 adds support for HTML5 custom data attributes and the dataset property, which provides programmatic access to them. You can assign data attributes to elements using a data- prefix followed by the attribute name(HTML):
<div data-example-data="Some data here"></div>
// to get var myData = element.dataset.exampleData; // to set element.dataset.exampleData = "something new";