Can someone please explain the difference between IE8 browser mode and document mode in simple terms?
What causes the document mode to change?
If a user changes the mode(s) via developer tools, does the change remain even if the page is refreshed?
I am asking this because we are doing some IE8 testing here, and different people have different combinations of the modes, and i want to try to figure out how this is happening.
Document Mode in Internet Explorer 11 In the Emulation tab in the Developers tools, you will see Mode, Display and Geolocation settings. The Document Mode selection lets you choose how Internet Explorer interprets the page, and can be useful for diagnosing compatibility issues.
In your Internet Explorer web browser, press F12 to open the Developer Tools window. Click Browser Mode and select the version of your web browser. Click Document Mode, and select the Internet Explorer standards for your Internet Explorer release.
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."
From this article on the IE8 blog, entitled How IE8 Determines Document Mode
So from that we get the following answers to your questions:
Q. What is the difference between browser mode and document mode in simple terms?
A. Browser mode is set in the developer tools to emulate different IE browser version behaviors while document mode is defined on the web page to tell IE to render the site differently for compatibility purposes.
Q. What causes the browser mode to change?
A. The user changes the browser mode in the dev tools.
Q. What causes the document mode to change?
A. The Doctype and the X-UA-Compatible meta tag and header set by the web developer.
Q. If a user changes the mode(s) via developer tools, does the change remain even if the page is refreshed?
A. The Browser Mode will stay, but if you change the Doctype and X-UA-Compatible, they will go back to what is defined on the page.
UPDATE: As Adrien Be points out below, IE9+ adds the ability to change the document mode in the dev tools via a setting which will persist on refresh.
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