Breaking the web
When Dean Hachamovitch demonstrated in December that the forthcoming Internet Explorer 8 browser passed the Acid2 test in standards mode, there were calls for Microsoft to clarify if “standards mode” was the default setting for IE8. Last week it was announced on A List Apart and the Internet Explorer blog that IE8 will render pages using an IE7-level rendering engine by default, and that web developers must opt-in to take advantage of the new Acid2-compliant rendering mode.
The mechanism for triggering the new standards mode is a meta declaration specifying which rendering engine IE8 should use:
<meta http-equiv="X-UA-Compatible" content="IE=8" />
X-UA-Compatible instruction tells IE8 to render the page using the new advanced mode. If the tag is omitted altogether, IE8 will render the page exactly the same as IE7 would.
During the past week I have read a number of articles and blog posts about the proposed version targeting changes in IE8, and while I am warming to the idea, I still have nagging doubts whether Microsoft’s implementation is the best approach to take.
The future of web standards in Internet Explorer
Microsoft’s stated reason for introducing version targeting is to avoid a repeat of the backwards compatibility issues experienced when IE7 was launched. Although IE7 was embraced by the web standards community as a bold step forwards, it was seen by many within Microsoft as somewhat of a failure. Sites that previously worked in IE6 unexpectedly “broke” in IE7, and Microsoft want to avoid making the same mistake when IE8 is released.
The mantra of the IE development team has always been “don’t break the web”, and version targeting is their way of making backwards compatibility a reality in IE8: the browser upgrade process will be painless for end users, there won’t be hordes of angry web developers hollering that their sites are “broken” in IE8, and inside Microsoft support for web standards will no longer be seen to occur at the expense of customer satisfaction. This last point is particularly significant for the future of web standards in Internet Explorer.
It seems fairly clear that those on Microsoft’s IE development team who advocate for web standards have had to fight every step of the way. I’m sure that there are loud voices within Microsoft who couldn’t give a damn about web standards, and whose greater concern is that when they release a new version of Internet Explorer existing websites continue to render as expected. As Jeffrey Zeldman points out, the inclusion of version targeting in IE8 will smooth the path for standards advocates within the IE team :
“Microsoft won’t be inundated with complaints which, in the hands of the wrong director of marketing, could lead to the firing of standards-oriented browser engineers on the IE team. The wholesale firing of standards-oriented developers would jerk IE off the web standards path just when it has achieved sure footing.”
But the proposed changes to Internet Explorer are not without their pitfalls, I suspect.
Frozen in time
One problem I see with the proposed version targeting mechanism is the potential harm it will do to the adoption of web standards. By the time IE8 is released, standards-aware developers will will be intimately familiar with the
X-UA-Compatible instruction, and will be in a position to make an informed decision about which rendering mode they support. But what of the legion of web designers and developers who have a less sophisticated understanding of web standards?
However much confusion may have been caused when IE7 “broke” websites that had previously rendered as expected, at least it forced web developers to acknowledge that the times were changing and they needed to change their methods to keep up. By contrast, if IE8 defaults to using the outdated IE7 rendering engine it is reasonable to assume that many web authors will remain blithely unaware that their sites may not, in fact, be fully compatible with the new standards-compliant browser. There will be no motivation to hone their craft, since in the absence of an
X-UA-Compatible directive flawed pages will render just fine.
What about IE9?
Another nagging doubt I have concerns future versions of Internet Explorer. We know that IE8 will use the IE7 rendering engine by default, but what of IE9? IE10? IE11? Will these new versions also default to IE7 rendering mode, which seems to only way for Microsoft to truly adhere to the “don’t break the web” rule? Or will IE9 instead default to IE8 rendering mode, IE10 to IE9 rendering mode, and so on? If that is the case, all that
X-UA-Compatible will achieve is to break the web later, rather than sooner.
If we assume that from IE8 onwards all versions of Internet Explorer will use the IE7 rendering engine by default, the implication is that web authors need never improve their scripting skill set, a prospect I find quite alarming. The only motivation to upskill would come from browser vendors who don’t implement
X-UA-Compatible (Mozilla and Apple for example), since their browsers will always render a page using the most current implementation of web standards, drawing attention to any scripting deficiencies.
On balance I think that version targeting with
X-UA-Compatible is a positive, maybe even necessary step for Microsoft to take. As a means of ensuring that future browser releases don’t “break” intranets and public-facing websites, the
X-UA-Compatible instruction is perhaps the only viable solution. It also allows the IE team to continue to implement web standards in their browser without fear of angering the corporate customer base on which Microsoft depends.
But the fact that IE8′s new standards mode will be opt-in seems somewhat counter productive. The message it sends to web developers is that adhering to web standards is optional, rather than necessary. The implementation of web standards in browsers may be far from perfect, and it’s a pain when new browsers break existing websites, but this instability also provides a motivation for us to continually improve the way we build websites.
Might it not be possible to require authors to opt-out of the new rendering mode instead of opt-in? If this were the case, sites that break in IE8 could still be fixed extremely quickly using the
<meta http-equiv="X-UA-Compatible" content="IE=7" />
There would be no need for developers to spend painful hours or days debugging sites that break in IE8. This single line of code would force IE out of its advanced rendering mode and into IE7 rendering mode, fixing any compatibility issues instantly and permanently.
Then again, perhaps like Eric Meyer I will come to fully appreciate Microsoft’s implementation of version targeting. God knows we’ve had enough browser sniffing, code forking and CSS hacks in our industry’s short history, and just maybe this could be a way to leave that mess behind for good.