With Internet Explorer 11, you can get better compatibility with web standards, other browsers, and real-world Web sites. Updated support for common WEB standards and added changes that prevent older versions of Web site from being incorrectly displayed.
These changes include:
User-agent String Change document mode change traditional API Add, change, and delete URL character encoding custom data properties HTML support updates for SVG "Pointer-events" properties reflect changes to standards-based specifications elastic box ("Flexbox") layout update Mutation Observer pointer event User-agent string change
For many traditional Web sites, some of the most obvious updates for IE11 involve user-agent strings. The following are the contents of the IE11 report on Windows 8.1:
Javascript
mozilla/5.0 (Windows NT 6.3; trident/7.0; rv:11.0) Like Gecko
The specific value of the user agent string differs depending on a number of factors, such as the operating system that is running the browser, the device that is running the browser, and whether the Web site is displayed with compatibility view. For more information, see User Agent string changes.
As with previous versions of Internet Explorer, some user-agent strings vary depending on the environmental conditions. The following are the strings displayed for IE11 on Windows 7:
Javascript
mozilla/5.0 (Windows NT 6.1; trident/7.0; rv:11.0) Like Gecko
If you compare these user-agent strings to a string that was reported by an earlier version of Internet Explorer, you will find the following changes:
Compatible ("compatible") and browser ("MSIE") tokens have been removed. The like Gecko token has been added (in order to be consistent with other browsers). The browser version is now reported by the new version ("rv") token.
These changes help prevent IE11 from being (incorrectly) identified as an earlier version.
Typically, you should avoid detecting specific browsers or browser versions. Assumptions based on this type of testing are easy to cause false positives when updating browsers. On the contrary, when you need to use functionality, detect and use progressive enhancements to provide a simplified experience for browsers or devices that do not support the required functionality.
In rare cases, IE11 must be uniquely identified. Use the Trident token to perform this operation. Document mode changes
Document mode is introduced in Windows Internet Explorer 8, which can help you convert features that are supported from earlier versions of the browser to existing standards and other browser-specific features. Subsequent versions of Windows Internet Explorer continue to use this transformation by introducing support for the functionality defined by industry standards and introducing new document patterns that simulate features supported by earlier versions.
While many web sites have been updated to provide a richer experience to other browsers, some sites continue to use existing traditional features to support the traditional experience of Internet Explorer, even if the latest version of the browser supports the experience presented for other browsers.
Starting with IE11, the edge mode becomes the preferred document mode; It represents the highest level of support available for browsers to use.
To enable edge mode using the HTML5 document type declaration:
Html
<!doctype html>
Edge mode is introduced in Internet Explorer 8 and is available in each subsequent release. Note that the features supported by the Edge mode are limited to the features supported by the specific browser version of the content being rendered.
Starting with IE11, document mode is deprecated and should not be reused except for temporary situations. Make sure to update sites that are dependent on traditional features and document patterns to reflect existing standards.
If you must target a specific document mode so that the site can work when you rerun the site to support existing standards and functionality, be aware that you are using the transition feature that may not be available in future releases.
If you are currently using X-ua-compatible headers for traditional document mode, your site may not be able to reflect the best experience applicable to IE11. For more information, see modern.ie.
Traditional API additions, changes, and deletions
Many web sites look for browsers that support traditional (HTML4) features to provide an experience for early browser optimization. This is a problem for browsers that support traditional functions and existing standards such as HTML5, CSS3, and so on. If a site detects traditional functionality before searching for existing standard support, it can provide a traditional experience and a richer experience for browsers that support existing standards.
As a result, IE11 adds, changes, and deletes many of the default traditional features:
The Navigator.appname property now returns "Netscape" to reflect the HTML5 standard and to match the behavior of other browsers. The Navigator.product property now returns "Gecko" to reflect the HTML5 standard and to match the behavior of other browsers. The Xdomainrequest object is replaced by the ORS of the XMLHttpRequest. Support for __proto__ has been added. The DataSet attribute has been added.
In addition, several traditional API features have been removed to support the functionality specified by the existing standard:
Remove API features override features Attachevent AddEventListener window.execscript eval window.doscroll window.scrollleft, Window.scrollTop document.all document.getElementById document.filesize, img.filesize use XMLHttpRequest to extract the source Script.onreadystatechange and script.readystate script.onload document.selection window.getselection document.createstylesheet Document.createelement ("style") Style.stylesheet style.sheet window.createpopup use div or iframe (zindex value very high) binary behavior changes ; Use standards-based equivalents, such as canvas, SVG, or CSS3 animation traditional data binding uses the data binding provided by the framework, such as Winjs
These changes can somehow block the poorly-prepared user-agent detection mechanism (incorrectly) identifying Internet Explorer as an older version. Therefore, sites that rely on current standards are displayed as expected. URL character encoding
IE11 changed the character encoding of the URL. Specifically, the query string and the XHR request are now encoded using the UTF-8 character encoding.
This change affects all URLs except the following:
Locates the name component (also known as "Fragment"). User name and password component. file://or ftp://protocol links.
These changes match other browser behaviors and simplify XHR code across browsers. Custom Data Properties
IE11 adds support for HTML5 custom data properties and dataset properties to provide programmatic access to them. You can assign data attributes to an element by using the data-prefix followed by the property name: HTML
<div data-example-data= "Some data Here" ></div>
To get or set the value of a data property, use this syntax: JavaScript
To get
var myData = element.dataset.exampleData;
To set
Element.dataset.exampleData = "Something new";
HTML support for SVG "pointer-events" Properties
Starting with IE11, it also supports pointer-events as a CSS property on HTML elements, and the effect is as follows:
Value Description
No
The element does not trigger the pointer input event (the hit test cannot be performed).
Other valid pointer event values
This element triggers the pointer input event.
The Pointer-events property is inherited by default, so it affects all descendants of the element that the attribute is applied to. Updates reflect changes to standards-based specifications
IE11 also includes updates that support standards-based WEB specifications that have been updated or are still evolving. This includes changes related to support for the following features: Flex box ("Flexbox") layout update
With IE11, you can update the site to align with the latest flex-frame standards and simplify Cross-browser code.
For more information, see the Flex box ("Flexbox") layout update. Mutant Observer
Mutation Observer is the new standard WEB platform feature in IE11, providing a direct replacement for all the same scenarios supported by the mutation event, as well as alternatives to the supported scenarios for property change events.
For more information, see Mutation Viewer and migrate mutation events and property change events to mutant observers. Pointer events
To meet the candidate recommendations of the World Wide Web Consortium pointer Event specification, the IE11 implementation has changed slightly compared to Internet Explorer 10.
For complete details, see "pointer event updates."