I just added X-UA-Compatible

I’ve been reading a bit about Microsoft’s proposed X-UA-Compatible http header. So I decided to add it to my site, however, I’m targeting the browser that I do recommend and do most of my testing with.


X-UA-Compatible: firefox

I encourage others to do the same. You can see the header (and corresponding meta tag) at this site:

I think you’re missing the point of the X-UA-Compatible meta tag.

Yep, missing the point slightly, you can’t just target any browser with this meta tag.

The only browser that will be supporting this method is IE8 (and presumably future versions of IE).

<meta http-equiv="X-UA-Compatible" content="IE=8">

You’ll need to add the above code to switch IE8 (once it’s available) into standard mode, otherwise it will use the IE7 rendering engine. (IE6 and IE7 don’t support the trigger and instead currently use a full doctype as the trigger).

If you haven’t already read this article, then this is probably a good starting point.

Hope that helps.

Actually, I think that I’m getting the point more than Microsoft. They want developers to declare that their code is compliant by targeting a specific version of IE. If I’m going to target a specific user agent, then it won’t be one of theirs. Just as they can emulate the IE7 engine in IE8, they can emulate the Gecko engine in IE8. I doubt that they can use the GPL code, as that would require GPL’ing the entire browser, but they can reverse engineer it just like the Opera devs have been reverse engineering IE’s display bugs. So far as I care, they can also code their browser to see that if a site is declaring Firefox as the targeted UA, then the site is standards compliant and they can render it with the IE8 engine.

Its version targeting not browser targeting.


<meta http-equiv="X-UA-Compatible" content="IE=8;FF=3;OtherUA=4" />

@logic_earth - That was used as an example on alistapart of how it might be used in future but since then Firefox, Opera and Safari have come out and said that they won’t be offering version targeting.

@dotancohen - You shouldn’t be writing code for a particular browser. If you write your code using web standards then you should find that it’ll work fine in Firefox, Opera and Safari anyway… then you’ll have to decide whether you want IE8 to render as IE8 or IE7 which is the whole purpose of this trigger.

Declaring this meta tag does NOT mean that you are going to be writing proprietary IE8 only HTML :wink:

Yeah I know they won’t but the example shows its for version targeting and not browser.

I will continue to write the same standards-compliant code that I’ve always written. But I am a jerk and I can afford to make a point that if MS thinks they can get people to write code specific for their browser, even a meta tag or http header, then I’ll simply use it to advertise Firefox compliance. That’s really what it is: an advertisement of where the page was checked to work.

OK, ignoring the fact you’re still missing the point, you only check the pages you write in Firefox?

How so? It’s in the source code for a start so 99.9% of people that view the majority of sites will never look at the source code and even if they did probably wouldn’t understand it. The other 0.1% that do understand HTML because it’s their job would hopefully understand what the meta tag was there for anyway.

The reasons for the trigger have been well documented and simply serve the purpose of putting IE8 into standards mode, otherwise it will render IE8 as IE7.

There’s no conspiracy. If you want to advertise Firefox then you’d be much better served leaving out the trigger completely which will force IE8 to render as IE7 than waste time putting in a meaningless Firefox trigger and then add some of those “Get Firefox” banners to your site :wink:

There are other negatives in using this trigger, my own personal problem with it is that lazy developers can continue to be lazy and have no incentive to learn about web standards.

Well, the trigger was invented for just that purpose: so that web developers can continue to be lazy. They can keep coding for IE6 for decades, apparently.

This is a genius way for IE to be both standards-compliant and encourage web developers to code in a way that will not display properly in Firefox or Opera.

I don’t write code for any browser. I write standards-compliant code, and do most of my development in Firefox. I then make sure that the site displays fine in Opera. Only then do I leave the house (because IE does not run on my choice of OS), go to the university, then ensure that the text is readable in IE6 and 7. As a hobbyist and not a professional, this is my situation:

  1. I can afford to let those who insist on using a broken browser see broken webpages.
  2. I cannot afford to spend time making sure that some non-compliant browser displays my sites how I intend. That’s time away from my studies and my family.

If someone wants to know what user agents are known to be compatible with my site, I’ll tell it like it is. Firefox is known to be compatible. So is Opera. I have no problem stating that in the page metadata. I understand that it was not the intention of the body who came up with the idea, but then again, VOIP was not likely the intention of Tim Burner-Lee when he came up with the idea of a packet-based Internet either. Improvements can be made, and one should expect that web technologies will be used in innovative ways not intended by their designers.

Not really. The trigger has been invented because of how poor IE was in the past and the problems that IE7 was perceived to have caused in breaking the web even though it was a more standards compliant browser than IE6 was.

This is Microsoft’s way of saying that if you’ve built a website which works in IE7 then it will definitely work in IE8.

The real purpose of the trigger isn’t so people can continue coding for IE6 (although that may be a side effect). Developers building websites should obviously code using the latest web standards and include the meta tag trigger as this should in theory make life easier for us… whether that actually happens we’ll have to wait and see.

No, what it means is that websites that are not currently Firefox compatible (because they are not standards compatible) will not have to become Firefox compatible to be IE8 compatible. IE can both claim standards compliance, and yet not force sites to update in a way that would let them display in Firefox.

Most very large, important Israeli websites are IE-only. You could say that my English proficiency is a direct result: Hebrew websites do not display in any browser that run on my choice of OS. So when I heard that IE8 would be standards-compliant, I was happy because that means that Israeli websites will then have to become standards compliant. But no, with the UA targeting, they will not.

Would it force people and companies to fix their code though? Or would the more likely situation be that everyone complains that IE8 has broken the web and these people and businesses decide to continue using IE6/IE7 because they know that the applications and websites they’ve used in the past will continue to work?

This reason is exactly why we’re still having to support IE6 now.

If IE8 was released without a trigger then it would without doubt break internal applications for a lot of business, you’d find that these business would therefore continue to use the IE that works for them and in turn mean that us as developers would have to continue supporting old versions of IE8.

I don’t really agree with the way that you’re required to opt-in to use IE8 as IE8 but I do understand why Microsoft have done it.

I also understand why they did it. Microsoft caters to the lazy and the I-dont-want-to-learn. Microsoft will not be “breaking the web” if IE8 is standards compliant without opting in. Microsoft broke the web when it made sure standards-compliant websites CANNOT be displayed on it’s browser. Microsoft would be fixing the web by not requiring opt-in standards compliance, therefore encouraging webmasters to update their code, but that would allow for competition from other standards-compliant browsers.

Yes, but I believe this is a side effect of this, not that Microsoft are deliberately setting out to do so

Not really. Tell me how an intranet that has thousands of pages and hasn’t been updated since IE6 is going to work correctly when suddenly it’s forced to use the correct box model (assuming no doctype is present) and how all the propertery non-standard IE Javascript will work?

It won’t and therefore IE8 would break this intranet (and a lot of other sites and applications). You’ll probably say that the business should update their site but as I’ve already pointed out, what are they likely to do? Stick with IE6 or update to IE8 and have to spend millions updating their intranet?

If businesses can upgrade to IE8 safe in the knowledge that their applications will continue to work then we’re much more likely to see older browsers fazed out which can only be a good thing for us as developers don’t you think?

It wouldn’t be fixing the web. As I’ve already pointed out, it would break a lot of sites if it forced standards compliance and many users/businesses wouldn’t upgrade as the perception would be that IE8 was a worse browser than IE6 (even though we obviously know better).

I don’t really agree with the way their doing it but not sure what the solution is. What you’re suggesting would be the ideal but it isn’t going to happen as the end result would simply be that large businesses would decide to stick with IE6, leaving us with a user base of 20-30% of IE6 users as we currently have so we’d be in a worse of position than we are now as we’d simply have one extra rendering engine to support without the older browsers losing enough of a user base for us to drop it completely.

At least with this trigger, us as developers will be able to use it to target a single version of IE which surely appeals more than the alternative?

It won’t work correctly. That is because it is broken. it was broken the minute it was released out the door. The fact that it was usable in a broken webbrowser does not mean that it was not broken.

[QUOTE=csswiz;3740235]It won’t and therefore IE8 would break this intranet (and a lot of other sites and applications). You’ll probably say that the business should update their site but as I’ve already pointed out, what are they likely to do? Stick with IE6 or update to IE8 and have to spend millions updating their intranet?[QUOTE=csswiz;3740235]

Since when was IE6 designed to be an application interface? If that’s what they are using it for, then let them stick with it, but that does not mean that IE8 cannot be the web browser that it was intended to be.

If businesses can upgrade to IE8 safe in the knowledge that their applications will continue to work then we’re much more likely to see older browsers fazed out which can only be a good thing for us as developers don’t you think?

The phasing out of older web browsers is good, so long as the browser coming in is an improvement, and not merely a replacement for the sake of change. If IE8 will not render my standards compliant website in a standards-compliant way, then it is not an improvement.

It wouldn’t be fixing the web. As I’ve already pointed out, it would break a lot of sites if it forced standards compliance and many users/businesses wouldn’t upgrade as the perception would be that IE8 was a worse browser than IE6 (even though we obviously know better).

So it’s the perception of better that is important, not actual advancement. I see. But I don’t agree.

I don’t really agree with the way their doing it but not sure what the solution is. What you’re suggesting would be the ideal but it isn’t going to happen as the end result would simply be that large businesses would decide to stick with IE6, leaving us with a user base of 20-30% of IE6 users as we currently have so we’d be in a worse of position than we are now as we’d simply have one extra rendering engine to support without the older browsers losing enough of a user base for us to drop it completely.

Even if a company needs to stay with IE6 for it’s intranet, that does not mean that they cannot install Firefox or Opera or any other web browser for browsing the web.

At least with this trigger, us as developers will be able to use it to target a single version of IE which surely appeals more than the alternative?

No, it does not. What appeals to me would be a web browser that displays standards-compliant websites in a standards-compliant way. I don’t buy the colateral damage argument, as anyone who depends on IE for an intranet can use a different browser for surfing the web.

I guess you never had a job inside of a business. (Even the computers at school are so restrictive) They lock down there computers so tight you cannot even format a thumb drive. Installing another browser is impossible. and further more all browsers are application interfaces for web applications.

The real world doesn’t follow standard and never will no matter how much one gripes. Business rather spend the money on things they actually need rather then fixing stuff that isn’t even broken. (it might be broken to you, but then again you don’t own the company or pay the bills for the company.)

I completely agree and is exactly the point I’ve been making. In an ideal world, IE8 would support standards out of the box and everyone would upgrade to the latest browser, fix any problems and things would be all rosy.

But in the real world things don’t work like that as it doesn’t make financial sense to businesses as a lot of them have the attitude, if it ain’t broke don’t fix it.

The solution of installing two browsers on all work or school machines really isn’t an option either as it would it would take training for many users to actually understand what they need to do… it may sound trivial to experienced users like ourselves but trying to explain that less experienced users need to open Firefox for web or IE6 for intranet really wouldn’t work in practice.

As logic_earth has pointed out, I suspect that you haven’t worked at any large businesses where things like browser versions and web “applications” are used for many internal tasks. Even things that should be cross browser compliant like SharePoint for example don’t quite work as they should in the more standards compliant browsers and don’t contain the doctype so that they work in IE7.

I completely understand your frustration as I do agree with you but the options your proposing wouldn’t work in the real world unfortunately as you need to look beyond the smaller picture of “websites”.

I’m sure those who need to already know, but here is the news anyway:

Yes, IE8 will default to standards-compliant mode. The opt-in will be for quirks mode.

[QUOTE=logic_earth;3740629]I guess you never had a job inside of a business. (Even the computers at school are so restrictive) They lock down there computers so tight you cannot even format a thumb drive. Installing another browser is impossible. and further more all browsers are application interfaces for web applications.

I know, at my university we cannot format usb drives from the winboxen either. Yet, Portable Firefox and Portable OpenOffice both run fine. From the stick and from the desktop.

[QUOTE=logic_earth;3740629]The real world doesn’t follow standard and never will no matter how much one gripes. Business rather spend the money on things they actually need rather then fixing stuff that isn’t even broken. (it might be broken to you, but then again you don’t own the company or pay the bills for the company.)

Broken may be a matter of perspective as you say, but once there is a standard, deliberately going against the standard is broken. No matter what logic or analogies one can think of.