Open In App

What does <meta http-equiv=”X-UA-Compatible” content=”IE=edge”> do ?

Last Updated : 16 Mar, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

Meta Tag: A tag with the http-equiv attribute set to “X-UA-Compatible” and the content attribute set to “IE=edge” is used to force Internet Explorer (IE) to use the latest version of the rendering engine. Regardless of the document’s compatibility mode.

When IE detects this meta tag, it renders the web page using the latest rendering engine available on the user’s computer. This ensures that the page is rendered using a newer standards-compliant rendering engine, rather than an older or compatibility-mode engine.

Here’s an example of how the <meta> tag might be used in the <head> section of an HTML document:

 

HTML




<!DOCTYPE html>
<html>
<head>
      <meta http-equiv="X-UA-Compatible" content="IE=edge">
      <title>My Web Page</title>
      ...
</head>
<body>
      ...
</body>
</html>


It’s worth noting that this meta tag is only relevant for Internet Explorer, and other modern browsers will simply ignore it.

Additionally, the `IE=edge` value instructs IE to use the highest mode available, which is typically the most standards-compliant mode. This can help ensure that your website or web application is rendered consistently across different versions of IE and that it takes advantage of the latest web standards and features.

It’s also worth noting that the http-equiv attribute is used to define an HTTP header for the document, and X-UA-Compatible is a non-standard header that Microsoft introduced to support compatibility with older versions of IE. However, it has become widely adopted and is now a common practice to include in web pages that need to support IE.

In summary, the tag with http-equiv=”X-UA-Compatible” content=”IE=edge” ensures that IE uses the latest available rendering engine to render a web page, helping to ensure compatibility with modern web standards and features.

One thing to keep in mind is that if your website or web application requires a specific version of IE’s rendering engine, you can specify that version number in the content attribute of the <meta> tag. For example, if you need to support IE9, you can use the following code:

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

This tells IE to render the web page using the IE9 rendering engine. However, unless you have a specific reason to use an older version, it is generally recommended to use IE=edge to ensure that the newer rendering engine is being used.

Finally, as of August 2021, Microsoft will no longer support Internet Explorer and users are encouraged to switch to Microsoft Edge, a modern, more secure browser. However, some websites and web applications may still require IE support for compatibility, so a tag with http-equiv=”X-UA-Compatible” may still be relevant in these cases.


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads