Episodes
Tuesday Jul 22, 2014
Compatibility IE 8 in IE 11
Tuesday Jul 22, 2014
Tuesday Jul 22, 2014
Internet Explorer 11 may look like a minor update to IE10. But it introduces the biggest
compatibility changes in IE’s history. These changes – despite not being
related to the rendering engine itself – are likely to break a lot web sites,
but they are necessary to ensure that future versions of IE perform as good as
possible.
1. The “Compatibility View” button has been removed.
2. New user-agent : MSIE is gone, IE11 now pretends to be a Firefox clone.
1. The “Compatibility View” button has been removed.
UPDATE 2014/04/10:
Microsoft has released an IE11 update for Windows 7 and as part of "Windows 8.1 Update" that introduces a better IE8 compatibility mode called "Enterprise Mode".
You can think of it as the successor of the "Compatibility View" button.
The “Compatibility View” button, that used to stand in the address bar next to the Stop/Refresh button since IE8, has been removed in IE11. However, the underlying feature is still there. Open the Settings menu, and click on Compatibility View settings, then add the web page address to the list. Any web page in that list will be rendered in IE7 compatibility mode.
Note: You can’t force the IE8/9/10 compatibility mode from this
dialog unfortunately.
You can use the F12 Developer Tools to force a specific document mode,
but changes won't persist after the developer tools are closed.
UPDATE: There is now a way to enable an IE8 compatibility mode in IE11. Consider that as the successor to the "Compatibility View settings" dialog (which simulates IE7).
The removal of the compatibility view button is the first step of deprecating the legacy document modes.
When IE8 was released, Microsoft decided to add a way to easily switch to a compatibility mode that allowed web pages designed for IE7 to display properly in IE8. IE would reload the page using the IE7 user agent, and display it in a way that emulates most IE7 quirks: this is called the IE7 document mode.
Since then, each new release of IE introduced a new legacy document mode corresponding to the behaviour of the previous version of IE. That means IE11 has : Edge mode (IE11), IE10, IE9, IE8, IE7, IE5 (quirk) document modes (and a new HTML5 compliant quirk mode). Note that the IE5 document mode (quirk mode) already existed in IE6/7.
However, Microsoft has announced the following: "Starting with Internet Explorer 11, new versions of IE will not be introducing new version-specific document modes." (source: http://www.modern.ie/en-us/f12).
This means that in IE12 there will be no such thing as an IE11 document mode. Actually, if you installed Windows 8.1 RTM without installing the GA update, you will see that there was no IE10 document mode in IE11. Apparently the IE team changed its mind and decided to wait until IE12 to stop adding legacy document modes. Anyway, Microsoft makes it clear that developers should stop relying on legacy document modes, as they won't be supported forever: "Starting with IE11, document modes are deprecated and should no longer be used, except on a temporary basis. Make sure to update sites that rely on legacy features and document modes to reflect modern standards." (source: http://msdn.microsoft.com/en-us/library/ie/bg182625(v=vs.85).aspx)
2. New user-agent : MSIE is gone, IE11 now pretends to be a Firefox clone.
Over the years, a lot of web sites have been relying on IE-specific hacks to allow old versions of IE such as IE6 to support some modern CSS features (such as rounded corners), or Alpha transparency with PNG pictures.
Since IE9, these hacks are no longer necessary, but a lot of web sites are still sending IE6 specific hacks to IE9/10. This results in bugs or performances issues, despite the fact that IE9 would be capable of displaying the site properly, if only it had been served the same CSS content as Firefox (without IE6-era CSS hacks).
Since webmasters are still continuing to rely on IE specific hacks, and more generally on User Agent sniffing to serve degraded content to IE users, Microsoft decided of a major change in IE11.
The new user agent looks like the user agent of a Firefox-like browser :
Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like GeckoAs opposite to the older user agent :
Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)
Traditionally, web sites would look for the string “MSIE” in the user agent to determine whether the browser is IE or not.
The new user agent lacks the “MSIE” string. And it doesn’t stop there. Many IE-specific DOM properties have been removed, so that client side scripts relying on the presence of IE specific properties such as ”document.all” (or window.ActiveX) to detect if the browser is IE will now execute the same code as other browsers.
Example :
if(document.all)
{
… //IE 6/7/8/9/10 will run this
}
else
{
… //chrome, firefox, IE11 will run that
}
However, there is a significant side effect: pages containing ActiveX controls may stop working, as they will likely check if the browser is IE before trying to instantiate an ActiveX control (using something like if(window.ActiveX) {…} )
Fortunately ActiveX support is still there. And if a webpage tries to instantiate an ActiveX control without checking the browser user agent, the ActiveX control will work as it did in previous versions of IE.
An interesting case is web sites relying on the Windows Media Player control to play Windows Media Audio or Video files. The WMP control exists as an ActiveX control (for IE), and as a NPAPI plugin (for every other browser on Windows/OSX). On MSDN, Microsoft even shows a sample that looks for the string “MSIE” in the user agent to decide whether to load the ActiveX or the NPAPI version of the plugin. And of course, in IE11, that code will try to load the NPAPI version, which will obviously fail, since IE is not compatible with NPAPI plugins. That is one of these rare situation where you NEED to do user agent sniffing to detect IE. In this situation, just look for the string “trident” in the browser user agent (Trident is the name of the Internet Explorer rendering engine).
Another cause of compatibility issues is the fact that a lot of websites are serving prefixed CSS content to web browsers. That means that websites serving CSS properties beginning with -moz- or -webkit- won’t be understood by IE, despite the fact that IE11 probably implement them either with the –ms- prefix, or in their standard form without vendor specific prefix.
Some websites are also only allowing whitelisted browsers with some code similar to that:
if(isIE)
{
… //IE 6/7/8/9/10 specific code
}
else if(isWebkit)
{
… //chrome, safari specific code with -webkit prefixes
}
else if(isFirefox)
{
…//firefox specific code with -moz prefixes
}
else
{
//unsupported browser
//IE11, Opera/Presto (before the switch to webkit), Lynx, …
}
That kind of practice has been causing headaches to Opera users for years, as many complex web apps such as Gmail and Hotmail were relying on browser detection to serve content only to browsers that have been tested and declared supported. Unsupported browsers were often served error messages or legacy versions without dynamic content.
As you can see, the user agent change in IE11 will cause a lot of compatibility troubles. But as opposite to earlier versions of IE, these problems won't be caused by breaking changes in IE11 rendering engine, instead they will happen because of poor development practices from webmasters and lack of web sites updates (despite the fact that IE11 was available as a beta version for months before the RTM).
Ultimately, this design change will allow IE11 to get rid of more than a decade of CSS/JS hacks relying on old and slow legacy features, which means webpages will run faster and use less memory. This will also force webmasters to evolve and stop considering IE as a browser which needs specific hacks.
3. Most Add-ons and Plugins (ActiveX controls) are disabled by default in IE11 on Windows 8.1
UPDATE 2013/11/13 : In an unexpected move, Microsoft has published an update (on 2013/11/12) for IE11 on
Windows 8.1 that disables the Enhanced Protected Mode (EPM) on the Desktop version of IE11 by default.
The Metro version still runs with Enhanced Protected Mode enabled.
Basically, we're back to the same situation as Windows 8.0,
which means IE11 on Windows 8.1 will continue to run legacy plugins and
browser addons like it did on Windows 8.0.
Still, Microsoft advises users to manually enable Enhanced Protected
Mode to improve security if all the addons they need are compatible with
EPM.
The Following content is still relevant if you enable Enhanced Protected Mode. But it no longer describes the default behavior of IE11 on Windows 8.1.
When Windows 8 was released, it introduced an improved version of the sandbox that shipped with IE7/Vista (see my blog post about it). It is called Enhanced Protected Mode (EPM), and it was enabled by default only on the Metro version of IE10. It was disabled by default on IE10 desktop in order to maintain compatibility with legacy plugins and browser add-ons. Plugins and add-ons developers had a full year to develop and publish EPM compatible versions of their plugins. Most did not do so (including Microsoft itself which didn’t bother to make its Silverlight plugin compatible with EPM).
In Windows 8.1, Microsoft is enabling by default the Enhanced Protected Mode in IE11 Desktop, and as a side effect most plugins and add-ons will no longer run on IE11.
This is actually a good thing because most users don’t really need any add-on or plugin (besides Flash Player, which is shipping with Windows 8 and is compatible with EPM).
As you may know, these last few years, a lot of people have been complaining about IE crashing frequently on their PC, or being very slow to open a new tab: this is due to plugins and add-ons (often in the form of toolbars, a kind of crapware/adware) installed on their PC either by the OEM or by 3rd party software they installed themselves. Even worse, outdated plugins and add-ons are often causing security issues because unpatched security flaws can be exploited by malicious web sites to install malware on their computer.
These problems were easy to avoid by using the Manage Add-ons feature in the Settings (or Tools) menu (introduced in IE6 SP2). Once every unnecessary plugin and add-on is disabled, IE becomes fast again and crashes very rarely (Note: to completely disable JAVA you need to disable the JAVA web plugin in the JAVA control panel. Disabling it in the manage add-ons dialog would not disable it completely).
As most people (even advanced users) don’t know about the add-on management feature, they think the stability and speed issues they encounter in IE are a “proof that IE is crappy”.
As a side effect of the EPM sandbox, a lot of people upgrading to Windows 8.1 will enjoy the benefit of running a clean install of IE11, without unnecessary add-ons, and they should see that IE11 is much faster and more stable than earlier versions of IE with a lot of crappy add-ons enabled, and even faster and more stable than Firefox and Chrome.
As Windows 7 does not support the Enhanced Protected Mode, IE11 still runs in the classic Protected Mode sandbox on this OS, which means legacy plugin and add-on compatibility is not affected. Everything will continue to run as on IE10. That means unfortunately that users who don’t disable unneeded plugins and add-ons will not enjoy an optimal web browsing experience.
Note that this problem is not specific to IE. As Firefox and Chrome became more and more popular, more and more 3rd party software have been installing crappy plugins such as toolbars and other useless extensions, making these browsers slower, less stable, and less secure.
Note: If you still need to run legacy plugins such as Silverlight, you don’t need to disable the Enhanced Protected Mode. IE will allow you to reload tabs individually in the older Protected Mode to allow legacy plugins to run on a per-site basis. However if you need to let an Add-on run, you will need to disable the Enhanced Protected Mode (in Internet Options, Advanced, Security).
Within a few months, addons and crapware/toolbars developers will certainly publish updates compatible with Enhanced Protected Mode. In other words, you still need to be careful about what you install. Enhanced Protected Mode improves the security of IE, but it can’t protect it from crapware that you install yourself on your computer (or rather, crapware that get installed along with apps you downloaded).
Comments (0)
To leave or reply to comments, please download free Podbean or
No Comments
To leave or reply to comments,
please download free Podbean App.