The following articles in the latest issue of the A List Apart magazine explain the necessity of browser targeting with the upcoming release of Internet Explorer 8, which is expected to be the most standards aware browser from Microsoft to date.
- Beyond DOCTYPE: Web Standards, Forward Compatibility, and IE8 by Aaron Gustafson,
- From Switches to Targets: A Standardista’s Journey by Eric Meyer.
To me the idea of browser targeting seems absolutely absurd, and reasons for that are so many that it will require another post to explain them all in detail. Here are just a few.
Which Browser, Which Version, What Targeting?
Browser targeting through a meta tag inside the HTML
<head> is the strategy proposed by Microsoft (developed together with the Microsoft Task Force from the WaSP) to deal with the forward-compatibility of their browsers. Essentially this means that if a website is developed by following the W3C recommendations, you would still have to add:
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> to the HTML, so that IE 8 renders it according to the standards.
If previously you could develop everything by following the standards and only then add tweaks for IE (through conditional comments), then now you will have to not only do that, but also add an extra “conditional comment” (in a form of a
meta tag), just to say:
“Dear IE, please use the standards if
IE=edge, but if
<!--[if lt IE 7.]> this makes sense to you <![endif]-->then
fix-ie.css, while if
<!--[if lt IE 6.]> you're still used this old <![endif]-->read this
Therefore, browser targeting would encourage developers to write for browsers and even specific version of certain browsers, instead of adhering to the standards. Sure, it might be a dream for some developers to design a site for a specific version of IE, Gecko, Opera and WebKit rendering engine, and then forget about it. But such ability is also a huge contradiction to the reasons we need Web standards in the first place.
Microsoft’s requirement of an additional code for enabling the “standards mode” will punish those who have actually built their sites according to the standards in the first place, and applaud to those who didn’t. Is this fair?
We already have a Document Type Definition (
DOCTYPE) for specifying the version of HTML markup and Cascading Style Sheets used in a document. Why do we need an extra Preferred Browser Version Definition (
BROVER)? This would be a double standard — browsers would have to consider not only the
DOCTYPE, but also the preferred
BROVER, which would result in an inconsistent rendering among different browsers. Absurd.
What do you think? Have you used any IE CSS “hacks” outside the conditional comments, that could potentially break the site in future? Do you know any CMS software which could suffer from the IE going the standards way?