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
274 views
in Technique[技术] by (71.8m points)

determining why a page is being renderred in compatibility mode?

I have a layout issue which is due to the containing page being rendered in compatibility mode on IE8. Is there a way to detect whats causing IE8 to enter compatibility mode for a particular page?

According to Microsoft's documents, the following conditions can cause a page to be rendered in compatibility mode (http://msdn.microsoft.com/en-us/library/cc288325%28VS.85%29.aspx):

  • Compatibility View is enabled for the page.
  • The page is loaded in the Intranet zone and Internet Explorer 8 is configured to pages in the Intranet zone in Compatibility View.
  • Internet Explorer 8 is configured to display all Web sites in Compatibility View.
  • Internet Explorer 8 is configured to use the Compatibility View List, which specifies a set of Web sites that are always displayed in Compatibility View.
  • The Developer Tools are used to override the settings specified in the Web page.
  • The Web page encountered a page layout error and Internet Explorer 8 is configured to automatically recover from such errors by reopening the page in Compatibility View.

After reviewing the page, I've ruled out the first possibilities such that it must be a page layout error on the page. I'd like to locate this error.

See Question&Answers more detail:os

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

1 Answer

0 votes
by (71.8m points)

Check if you have any <meta> tags forcing IE into compatibility mode.

You can force it to render as IE8 (fully CSS 2.1 compliant) if you wish:

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

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

...