4

What is the difference between IE9 and IE9 Compatibility View browser mode? Also if I am adding X-UA-Compatible header at server-side (Java), does it impact the Browser mode ?

httpRes.addHeader("X-UA-Compatible", "IE=edge");

Does this override the Browser Mode?

I need a way by which even if the user plays around with the Developer toolbar Mode settings, he is never shown the compatibility view. How can I do that?

copenndthagen
  • 49,230
  • 102
  • 290
  • 442
  • While you cannot control the Developer Toolbar, the first question is why you think that would be a good idea? – EricLaw Jul 16 '13 at 15:35

2 Answers2

1

I don't know if you've already read here, there is a clear explanation!

Alesanco
  • 1,840
  • 1
  • 11
  • 13
  • 1
    Well...It does not answer my question related to overriding issue..like how i can override Developer toolbar settings? – copenndthagen Jul 16 '13 at 12:02
  • 1
    Unfortunately you can not override Developer toolbar settings, because is on browser, and you can not force the browser to do what you want... I think is for security reason too. – Alesanco Jul 16 '13 at 12:40
1

You cannot stop the user from playing around with the developer toolbar, and to be honest that is a very very good thing. I wouldn't want you to take control over my browser, not that I'm using IE, but still.

What you can do however is to tell the browser how it should render your page. And that's what the X-UA-Compatible is for.

Okay so actually answer some of your questions:

Compability view is for sites that are designed for older versions of IE.

Websites that are designed for older versions of Windows Internet Explorer don't always display as expected in the current version. We addressed this in Windows Internet Explorer 8 by adding the Compatibility View function that allows users to "revert" to a previous browser version of the platform, which emulates IE7 Standards mode.

Which you can read in the link provided by @Alesanco.

So what does X-UA-Compatible do? Well it tells the browser in which mode it should render the page, which means that you can tell IE9 to render the page as if it was IE5. This means that you can control the rendering of the page to some extent, but you cannot expect to have control over wether the user plays around with the developer toolbar or not, unless you have access to the users computer.

See this thread for more information.

Community
  • 1
  • 1
Daniel Figueroa
  • 10,348
  • 5
  • 44
  • 66
  • 1
    I've edited out your paragraph on meta-tags and server-side — because it wasn't correct. `` in your HTML has the same effect as sending an `X-UA-Compatible: IE=edge` HTTP header before the HTTP body. Hence the name: `http-equiv` stands for *"HTTP equivalent"*. – ulidtko Jul 31 '13 at 15:04