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?
Further Reading: Compatibility and IE8 by Chris Wilson at the IEBlog.
This is a comment I left on Jeffrey Zeldman’s blog post Not your father’s standards switch:
Jeffrey, did you really fight this Web Standards battle to give it up so easily?
In 1999 developers used tables (and other cool and hip HTML features, of which you know). Only because they could easily build something that looked and behaved just the way they wanted without too much of an effort.
Now we build with standards. And only because we can easily build websites using standards that look and function as expected in most of the browsers without much of an effort. Except IE, of course. Fortunately we now have enough knowledge to make it behave like standards aware browser with just a few lines of CSS or extra HTML markup which doesn’t hurt anybody.
Finally Microsoft gives us something that doesn’t require a special care — IE 7. Why spoil this great evolution of IE and the Web, and ask for a treat for the upcoming versions?
Every web developer will know about a new version of IE being released by Microsoft, even those who don’t know what Web Standards mean, and those for whom the HTML is generated by a CMS.
Isn’t this the moment we all have been waiting for — the Web dominated by the Standards based websites, and having the quirky ones as a minority.
This is the day when Microsoft should put all their marketing money in an effort of declaring that standards are good. Whether stating that invalid sites make your computer unsafe or using other reasons that could be easily picked up by the general public.