Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Force IE9 to emulate IE8. Possible?

Is this possible at all? I tried adding this to the page but it didn't change a thing.

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

UPDATE- I'm trying to do this because our site has some IE9 specific CSS issues, which wouldn't appear in IE8.

Thanks

like image 338
adamJLev Avatar asked Jan 27 '11 00:01

adamJLev


People also ask

How do I emulate ie8?

Just open a website on Edge, go to settings in the right top, and choose "Open with Internet Explorer" You can then pin the new IE window to open it straight next time. Only on this IE window you can choose to emulate other IE versions.

How do I force compatibility mode in IE11?

Open up Internet Explorer (IE 11) Press the Alt key on your keyboard, this will make a menu bar appear. Click on the Tools menu tab. Select the Compatibility View settings option.


1 Answers

You can use the document compatibility mode to do this, which is what you were trying.. However, thing to note is: It must appear in the Web page's header (the HEAD section) before all other elements, except for the title element and other meta elements Hope that was the issue.. Also, The X-UA-compatible header is not case sensitive Refer: http://msdn.microsoft.com/en-us/library/cc288325%28v=vs.85%29.aspx#SetMode

Edit: in case something happens to kill the msdn link, here is the content:

Specifying Document Compatibility Modes

You can use document modes to control the way Internet Explorer interprets and displays your webpage. To specify a specific document mode for your webpage, use the meta element to include an X-UA-Compatible header in your webpage, as shown in the following example.

<html> <head>   <!-- Enable IE9 Standards mode -->   <meta http-equiv="X-UA-Compatible" content="IE=9" >   <title>My webpage</title> </head> <body>   <p>Content goes here.</p> </body> </html>  

If you view this webpage in Internet Explorer 9, it will be displayed in IE9 mode.

The following example specifies EmulateIE7 mode.

<html> <head>   <!-- Mimic Internet Explorer 7 -->   <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" >   <title>My webpage</title> </head> <body>   <p>Content goes here.</p> </body> </html>  

In this example, the X-UA-Compatible header directs Internet Explorer to mimic the behavior of Internet Explorer 7 when determining how to display the webpage. This means that Internet Explorer will use the directive (or lack thereof) to choose the appropriate document type. Because this page does not contain a directive, the example would be displayed in IE5 (Quirks) mode.

like image 92
jsims281 Avatar answered Oct 13 '22 00:10

jsims281