views:

335

answers:

3

When users go on my website, I want to force them to use IE8 non-compatability mode. If they use compatibility mode, my website doesn't work.

How to force it off? Is it a meta tag?

Edit: Yes, you can do it. Solution is this:

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
+1  A: 

I would recommend against doing this, even if you can find a way to do it. Compatability Mode is a setting the user is meant to have control over. You shouldn't be changing it out from under the user.

You should either fix your site to work with compatibility mode, or just tell your users not to do it.

John Saunders
Why the downvote? Am I supposed to guess?
John Saunders
Sorry, mis-read the question. Reverting the vote.
Joey
@Johannes: I took it that he was talkling about the new "Compatibility View" feature of IE, which is plainly a user feature. What do _you_ think he's asking about?
John Saunders
@Johannes: I always comment before the downvote, then do the downvote.
John Saunders
The same, actually. And the HTTP header X-UA-Compatible is intended to toggle *exactly that* without user interaction. It's intended for site authors to avoid having users to fiddle with the settings until the site looks right. It's a per-page setting, though and therefore won't do any harm if set by the site. After all, styles are also not universal :-). Hm, ok, actually the original complaint to this answer still remains.
Joey
+4  A: 

You can do it as a tag or as a setting in IIS (with the tag)

Tom
A: 

You can't force IE into non-compatibility mode.

What you can do is to tell the browser that the page works in IE 8, then it will remove the compatibility button in the address bar. A user can of course still force the browser into compatibility mode, but not with just a click of a button.

See: How to avoid ie8 compatibility button?

Guffa