TIMEX
TIMEX

Reputation: 272374

How do I disable "compatibility mode" in Internet Explorer 8 for my website?

When users go on my website, I want to force them to use Internet Explorer 8 non-compatibility 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. The solution is this:

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

Upvotes: 18

Views: 31809

Answers (6)

Dextere
Dextere

Reputation: 301

Here is some JS that helps

Code in the following condition runs only in IE7 and lower: The below code works if the user is on IE7 or even in IE 8 (Compatibility View only) then you can navigate them to your Error Page.

if (document.all && !document.querySelector) {
 alert('you are on IE7 or lower');
 window.location.href = "URL";
}

The next one runs in IE8, but not in IE7 or IE9+:

if (document.all && document.querySelector && !document.addEventListener) {
alert('you are on IE8');
window.location.href = "URL";
}

Upvotes: 0

ZOXEXIVO
ZOXEXIVO

Reputation: 960

You need remove port number from your domain site name site:1180/index/

If browser see port number in url - hi "think", that's is intranet.

setup your dns server for friendly urls - site.com/index and it work OK

Upvotes: 1

1Webmaker
1Webmaker

Reputation: 11

<meta http-equiv="X-UA-Compatible" content="IE=9" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
<META content="IE=edge" http-equiv="X-UA-Compatible">
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<meta http-equiv="X-UA-Compatible" content="IE=IE9" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />

all and any of it might help but it all depend on your script. You do not need to use all it is just different way to say it. it depend on script that you use on site

Upvotes: 1

Tom
Tom

Reputation: 22841

You can do it as a tag or as a setting in IIS (with the tag), set to IE=EmulateIE8

Upvotes: 8

John Saunders
John Saunders

Reputation: 161831

I would recommend against doing this, even if you can find a way to do it. Compatibility 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.

Upvotes: -1

Guffa
Guffa

Reputation: 700840

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?

Upvotes: 4

Related Questions