At the start of the Internet Explorer 8 project we made a commitment to great website compatibility. It’s worth noting that this commitment hasn’t changed, even given the short-term impact of our announcement to better align with Microsoft’s interoperability principles. In other words, compatibility has been and continues to be a very important part of the Internet Explorer 8 feature set.
With Beta 2 we’re announcing a brand new feature known as Compatibility View. In a nutshell, Compatibility View allows content designed for older web browsers to still work well in Internet Explorer 8.
Compatibility View and End Users
When a web site says that it supports modern web standards, Internet Explorer 8 respects that and displays the site using its most standards compliant mechanism. In the majority of cases, this works out just fine. However, every once in a while, a page that says “display me using modern standards” really means “display me like Internet Explorer 7 used to display modern standards pages”. This is where Compatibility View comes in.
There are a bunch of changes under the hood, but the main points to know are –
- Sites on the public internet still display in IE8 Standards Mode by default.
- Switching in and out of Compatibility View (between IE7 and IE8 modes) happens on the fly without a browser restart.
- Compatibility View is domain specific.
A new UI button located in the navigation bar just to the right of the address bar (next to the refresh button) controls the Compatibility View feature and replaces the Emulate IE7 button from Beta 1.
IE only displays this button when toggling into Compatibility View makes sense, such as when viewing Standards mode pages. In all other cases, such as when viewing Quirks mode pages or viewing intranet sites (they’re already being displayed in Compatibility View as discussed later in this post), IE hides the button.
Depending on the speed of your machine, you may see the page refresh when the Compatibility View button is selected. In any case, a balloon tip lets you know that the site is now running in Compatibility View. Additionally, the Compatibility View icon shows a “pressed” state so that you can know what view you’re running in after the balloon tip disappears.
The "scope" of emulation is limited to the domain you are viewing when you press the button, not some other mechanism like the life of the process or the tab. And, Internet Explorer remembers your preference by storing the domain in a client-side list so that the next time you visit the site you don't have to press the button again.
Compatibility View and the Enterprise
A large number of line-of-business websites are Internet Explorer 7 capable today. In order to preserve compatibility, Internet Explorer 8 ships with smart defaults based on zone evaluation. In the default state, all sites on the public internet display in Internet Explorer 8 Standards mode (Compatibility View off) and all intranet websites display in Internet Explorer 7 Standards mode (Compatibility View on).
Let’s look at some examples.
If you navigate to sites on the Internet like www.msn.com and www.live.com, Compatibility View is off by default. Internet Explorer 8 identifies itself with a User Agent string of ‘8’, Version Vector of ‘8’ and displays webpages that trigger standards mode in Internet Explorer 8 Standards mode. The same is also true if you navigate by IP address, such as http://192.168.0.1. As Internet Explorer can’t tell offhand whether the IP address is internal or external, it assumes the latter. Use Compatibility View to fix problems with websites in this category just like you used to use the Emulate IE7 button.
If you navigate to sites on your local intranet like http://myPortal and http://sharepoint/sites/mySite, Internet Explorer 8 identifies itself with a User Agent string of ‘7’, Version Vector of ‘7’, and displays webpages that trigger standards mode in Internet Explorer 7 Standards mode. This combination allows webpages that worked correctly in Internet Explorer 7 to continue to do so in IE8.
Just for completeness, it’s also worth noting that local pages such as ‘C:\Temp\MyWebPage.htm’ display in Internet Explorer 8 mode (Compatibility View off) by default.
A new entry in the ‘Tools’ menu allows for advanced configuration of the feature.
You can configure all intranet sites to display in Internet Explorer 8 mode. You can also configure policy such that every site is viewed in Internet Explorer 7 Compatibility View (identical to the behavior from Internet Explorer 8 Beta 1 when the Emulate IE7 button was pressed). Lastly, you can pre-populate a list of sites that should always be viewed in Compatibility View and / or edit the current entries that are populated via Compatibility View button press. This is especially handy if you encounter a Quirks mode site that is blocking Internet Explorer 8 due to incorrect User Agent String detection – you can add the site in question to the compatibility list and be on your way.
The entire feature is Group Policy enabled, giving you the most granular level control over the various knobs and switches. Most settings can also be configured using the IEAK.
Compatibility View and Web Developers
If you develop pages according to modern web standards and use the DOCTYPE directive to indicate layout mode, Internet Explorer behaves just as you would expect – Quirks DOCTYPEs map to Quirks mode and Standards DOCTYPEs map to IE8 Standards mode. And, just as in Beta 1, you can opt-out of IE8 Standards mode via <META> tag / HTTP header.
The best way to ensure users have a great experience with your website, and thus don’t have to use the Compatibility View feature at all, is to test your site using Internet Explorer 8 and update it as necessary. In the event that a user selects Compatibility View for your site, you can “bring them back” to your desired layout mode via use of the version targeting <META> tag / HTTP header. A new content value, ‘IE=EmulateIE8’, rounds out the list of supported values and assists in this particular scenario.
|Display Standards DOCTYPEs in IE8 Standards mode; Display Quirks DOCTYPEs in Quirks mode. Use this tag to override compatibility view on client machines and force Standards to IE8 Standards.|
The presence of the <META> tag / header serves as an indication that the site has been updated to support IE8 and its value “wins” over whatever mode Compatibility View on the client would have resulted in. The presence of the tag / header also has some other side effects. For one, it triggers clean-up of the user list entry, ensuring that long-term the client’s user list gets pruned and you don’t have to keep the <META> tag / header in place forever. (BTW, the user list also gets pruned when you choose to delete browser history). For another, presence of the tag / header causes the top-level command bar icon for Compatibility View to not be displayed, effectively preventing most users from adding your site to the Compatibility View list.
A new tag in the User Agent string allows for detection of clients viewing your site in Compatibility View. This tag is also present in the “normal” Internet Explorer 8 User Agent string.
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Trident/4.0; SLCC1; Media Center PC 5.0; .NET CLR 3.5.21022)
Updated IE8 UA String:
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; Media Center PC 5.0; .NET CLR 3.5.21022)
Finally, an update to the Developer Toolbar completes the feature set. The new ‘Browser Mode’ menu lets you modify how Internet Explorer behaves as well as how it reports its version to servers and websites. This lets you use Internet Explorer 8 to see what your site looks like in IE8 (the default), what your site looks like in IE7, and what your site looks like for users in IE8 who are running in Compatibility View.
The ‘Document Mode’ menu continues to exist independently of ‘Browser Mode’ to let you see what your site would look like if you changed the layout mode by using a different DOCTYPE or the <META> tag.
We hope you find the new Compatibility View feature a noticeable improvement over the Emulate IE7 button experience.
If you encounter problems with a specific website that Compatibility View doesn’t resolve, we’d like to know about it. The Report a Webpage Problem tool will help you submit a report.
Lead Program Manager