user2960372
user2960372

Reputation: 63

Force IE8 to use Browser compatibility view

I have a page using the mixitup jquery script. It works perfectly in Chrome, Opera and IE11.

But I need it to work in IE8 too.

I have the script working in IE8, just without the fancy animations, which is fine.

Except, it only works in IE8 when I set the browser compatibility view to 'Internet Explorer 8 Compatibility View'.

In the screenshot below, it shows different version, but you can see what option I mean, the second one rather than the first one.

I need 'Internet Explorer 8 Compatibility View' not 'Internet Explorer 8'

I have tried entering the following meta to the top of page:

<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">

and also:

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

But both those just seem to force the 'Internet Explorer 8', the equivalent to the top options in the screenshot... not the second one, which I need.

Can that be done?

thanks

Upvotes: 0

Views: 108

Answers (1)

Ahmer Ali Ahsan
Ahmer Ali Ahsan

Reputation: 6136

If I understand your question correctly then may be below explanation will help you.

Using <meta http-equiv="X-UA-Compatible" content=" _______ " />

  • The Standard User Agent modes (the non-emulate ones) ignore <!DOCTYPE> directives in your page and render based on the standards supported by that version of IE (e.g., IE=8 will better obey table border spacing and some pseudo selectors than IE=7).
  • Whereas, the Emulate modes tell IE to follow any <!DOCTYPE> directives in your page, rendering standards mode based the version you choose and quirks mode based on IE=5
  • Possible values for the content attribute are: content="IE=5"

    content="IE=7"

    content="IE=EmulateIE7"

    content="IE=8"

    content="IE=EmulateIE8"

    content="IE=9"

    content="IE=EmulateIE9"

    content="IE=edge"

If meta tag solution wasn't working for you then set it

header('X-UA-Compatible: IE=edge,chrome=1');

Upvotes: 1

Related Questions