Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
482 views
in Technique[技术] by (71.8m points)

caching - 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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...