Tuesday, January 22nd, 2008
If you want compatibility to work well in IE8 and lower, then it is time to get to know the
X-UA-Compatible header. This is according to Chris Wilson in his post on compatibility and IE8.
He links to Aaron Gustafson’s new article on the issue, and summarizes himself:
Aaron Gustafson, one of the members of the WaSP-Microsoft Task Force wrote an article detailing where we ended up that was posted on A List Apart today; I highly recommend reading it for a different perspective. Iâ€™ll summarize, though, that:
- â€œQuirks modeâ€ remains the same, and compatible with current content.
- â€œStandards modeâ€ remains the same as IE7, and compatible with current content.
- If you (the page developer) really want the best standards support IE8 can give, you can get it by inserting a simple <meta> element. Aaron gives more details on this in his article.
We believe this approach has the best blend of allowing web developers to easily write code to interoperable web standards while not causing compatibility problems with current content. We also think this approach allows developers to opt in to standards behavior on their own schedule and as it makes sense to them, instead of forcing developers into a responsive mode when a new version of IE has different behavior on their current pages. Iâ€™m excited by all the standards work weâ€™re doing in IE8; Iâ€™m even more excited that we wonâ€™t cause a lot of compatibility problems for our users and web developers.
Sam Ruby has chimed in saying that he just wants IE to do the right thing, as best as it can, and thus put the following in his .htaccess:
BrowserMatch MSIE best-standards-support
Header set X-UA-Compatible IE=edge env=best-standards-support
He finished with some questions:
- What is MySpace supposed to do? Users copy/paste input into text areas and the result is wrapped in a template. Multiply this question by all of the sites (Blogger, WordPress, etc.) that do similarly.
- How does this affect feed aggregators? Use xhtml:meta as extension elements? How are planet / river of news aggregators supposed to cope?
Then, Eric Meyer came out to talk about switches versus targets:
The second major difference between browser sniffing and version targeting is that browser sniffing looks forward while version targeting looks back. Looking forward is one big reason browser sniffing is fragile: itâ€™s hard to predict the future. To pick one example, Safariâ€™s inclusion of â€œlike Geckoâ€ in its user-agent identifier broke a fair number of sniffer scriptsâ€”even those that were comparatively well done. The authors of those scripts had simply failed to predict that a non-Gecko browser from Apple would include the word â€œGeckoâ€ in its user-agent identifier.
And PPK of quirksmode spoke of the different between versions and browser sniffing.
Posted by Dion Almaer at 12:30 pm