How can I force IE to use * not * compatibility mode?

I looked around stackoverflow quite a bit and found that the following is the most recommended way to force incompatibility mode:

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

      

My problem with these answers is that they are all answers to questions from IE 8 and 9.

Is this still a way to force the latest browser that the user is running?

This is for a public site, and our users use IE10, IE9, IE7, and IE8 a lot (in roughly that order).
And yes, using IE7 is more common than IE8.

My only limitation for IE8 is that the site is readable.

This is a modern site and I want any browser not in compatibility mode. I know there is a way to specify the browser version, but I would rather not do that with the release of Win10 at the end of next month.

If anyone has any information on what Windows 10 will do with this line, that would be very useful to know (the new browser is called "Edge").

Thanks for any help that can be provided.

-Chris C.

PS I have the first line (no spaces) of the page:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"

      

" http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd ">

+3


source to share


1 answer


I am working on the Internet Explorer and Microsoft Edge team.

What you have specified is the x-ua-compat title / meta tag. It is designed as a support solution to help you move forward and embrace support for modern browsers without requiring immediate care for upgrading your codebase. This does not mean a long term web compatibility solution.

The best way to give your user the most ideal experience is to use the HTML5 doctype first:

<!DOCTYPE html>

      

This should be the first in your document; nothing should precede it. From now on, use only valid markup. Check your document for errors, unbalanced tags, labels, etc. Remember, act in your markup .

Use x-ua-compat header / meta-tag if you have legacy code that you cannot replace or remove right away. In these scenarios, it is allowed to post users in stale document mode:



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

      

The above browser will move the browser to Internet Explorer 9 Edge Mode, if that mode exists. Internet Explorer versions prior to 9 will use the latest document mode.

You can also offset them to show benefit:

<meta http-equiv="X-UA-Compatible" content="IE=10,9,7,8" />

      

But please don't forget my main message here - the above is only a workaround. The end goal is to update your document with modern code.

Microsoft Edge, the successor to Internet Explorer, does not support document modes . Microsoft Edge will interpret your document like Firefox and Chrome.

+10


source







All Articles