When I open a webpage in IE9 with DOCTYPE as
<!DOCTYPE html>
It opens Document Mode as IE7 standards.
I need default IE9 standards on opening the page.
How to correct this document mode problem?
A screenshot of how it comes in IE browser developer tool
Change the Document Mode to Internet Explorer 9 Standards and try to view the content again. To change the Document Mode, press F12, click Document Mode: , and then select Internet Explorer 9 Standards."
Compatibility View is a feature of Windows Internet Explorer 8 that enables the browser to render a webpage nearly identically to the way that Windows Internet Explorer 7 would render it.
Try document modesOpen the site in Internet Explorer 11, load the F12 tools by pressing the F12 key or by selecting F12 Developer Tools from the Tools menu, and select the Emulation tab. Run the site in each document mode until you find the mode in which the site works.
Try this answer: https://stackoverflow.com/a/13524518/1679310.
Summary, give the IE browser more information in the meta tag:
<!DOCTYPE html> <html> <head> <title>My Web</title> <meta http-equiv="X-UA-Compatible" content="IE=edge" />
Edit Note: As Olly Hodgson mentioned, the proper option is IE=edge, as currently stated in the above snippet. Below is the original, also working version:
<meta http-equiv="X-UA-Compatible" content="IE=100" />
There can be multiple reasons why it could be parsing the document under IE7 standard:
X-UA-Compatible
header for IE7 in the HTTP response of the document. Check the server response headers using a tool like Fiddler.X-UA-Compatible
property value for IE7.Tools -> Compatibility view settings
in IE. The "Display all websites in Compatibility view" should be unchecked too.Update 2016-01-28
As @Gordon pointed out in the comments below, another reason can be that the network administrator has set the site for compatibility view as a Group Policy on the network.
The only resolution in that case is to contact the network administrator to remove the site from the Group Policy. See HTML1203 here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With