Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Force IE8 *not* to use Compatibility View

Just updated my site to newer, much more standards compliant design. My previous design was so rubbish that I had to use the IE=EmulateIE tag to force IE7 emulation.

Unfortunately, I believe that browsers may be caching this setting from previous visits, causing my new site (which looks great without the button pressed) to look rubbish again...

Is there any opposite tag that I could use, or some magic I can make PHP do to the HTTP headers disable caching of this setting?

like image 520
Jack Shepherd Avatar asked Jan 14 '10 14:01

Jack Shepherd


People also ask

How do I turn on Compatibility View?

Open Internet Explorer for the desktop, click Tools, and then click Compatibility View settings. In the Compatibility View Settings box, add the problematic website URL, and then click Add. Compatibility View is turned on for this single website, for this specific computer.

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.

How do I fix Compatibility View in Chrome?

Compatibility mode can be usually be resolved in a Google Chrome browser by clicking the red shield icon at the end of the URL address bar and loading "unsafe scripts" and reloading the page.


1 Answers

In the absence of an X-UA-Compatible http-equiv header, the compatibility mode is determined by the !DOCTYPE (or the absence of a !DOCTYPE, as the case may be). For a chart of which !DOCTYPE gives you which mode (in various browsers) see here:

http://hsivonen.iki.fi/doctype/ (You'll need to scroll down toward the bottom of the page.)

You can override this behavior by using a meta element to specify an X-UA-Compatible http-equiv header, like so: <meta http-equiv="X-UA-Compatible" content="IE=edge" >

(Note: IE=edge goes with the highest available version -- currently IE8 as of this posting -- or one can explicitly specify IE8.)

For more information, see here: http://msdn.microsoft.com/en-us/library/cc288325(VS.85).aspx

like image 172
Tim Goodman Avatar answered Nov 08 '22 10:11

Tim Goodman