Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What will this do: <meta http-equiv="X-UA-Compatible" content="IE=edge">? [duplicate]

Tags:

html

meta

What will this following tag will do to my browser when a HTML page is loaded?

<meta http-equiv="X-UA-Compatible" content="IE=edge"> 
like image 389
user3355705 Avatar asked Mar 19 '14 09:03

user3355705


People also ask

What is the purpose of meta HTTP-equiv X-UA-compatible content IE edge?

The X-UA-Compatible meta tag is a http-equiv meta tag. X-UA-Compatible Meta Tag Recommended Uses: Use the X-UA-Compatible meta tag on web pages where you suspect that Internet Explorer 8 will attempt to render the page in an incorrect view. Such as when you have an XHTML document with an XML declaration.

Do you need X-UA-compatible?

Depending upon what Microsoft browsers you support you may not need to continue using the X-UA-Compatible tag. If you need to support IE9 or IE8, then I would recommend using the tag. If you only support the latest browsers (IE11 and/or Edge) then I would consider dropping this tag altogether.

What does meta HTTP-equiv content type mean?

http-equiv = "content-type" Indicates that the meta element is in the encoding declaration state and represents a character encoding declaration.

What is IE and edge?

The IE=edge portion instructs the browser to go into the latest supported Document Mode; for Internet Explorer 11, this is the IE11 Document Mode. In contrast, IE=10 instructs the browser to go into Internet Explorer 10 Document Mode.


1 Answers

http://msdn.microsoft.com/en-us/library/jj676915(v=vs.85).aspx

Understanding legacy document modes

Use the following value to display the webpage in edge mode, which is the highest standards mode supported by Internet Explorer, from Internet Explorer 6 through IE11.

<meta http-equiv="x-ua-compatible" content="IE=edge">

Note that this is functionally equivalent to using the HTML5 doctype. It places Internet Explorer into the highest supported document mode. Edge most is most useful for regularly maintained websites that are routinely tested for interoperability between multiple browsers, including Internet Explorer.

Note Starting with IE11, edge mode is considered the preferred document mode. (In earlier versions, it was considered experimental.) To learn more, see Document modes are deprecated. Starting with Windows Internet Explorer 8, some web developers used the edge mode meta element to hide the Compatibility View button on the address bar. As of IE11, this is no longer necessary as the button has been removed from the address bar. Because it forces all pages to be opened in standards mode, regardless of the version of Internet Explorer, you might be tempted to use edge mode for all pages viewed with Internet Explorer. Don't do this, as the X-UA-Compatible header is only supported starting with Internet Explorer 8.

Tip If you want all supported versions of Internet Explorer to open your pages in standards mode, use the HTML5 document type declaration, as shown in the earlier example.

like image 199
RobIII Avatar answered Sep 23 '22 15:09

RobIII