I want to add <meta http-equiv="X-UA-Compatible" content="IE=edge">
in my html page, so that it can use the highest mode available, if user browse this page in a non-IE browser, for example, firefox or chrome, does this line code impact on firefox or chrome ?
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.
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.
The http-equiv attribute provides an HTTP header for the information/value of the content attribute. The http-equiv attribute can be used to simulate an HTTP response header.
I want to add in my html page, so that it can use the highest mode available.
This is a good idea. In general IE should use it's best mode anyway, but occasionally (eg due to the user's browser config) it might default to a compatibility mode, which isn't great if your page isn't designed for it. So putting this tag into your page is a good way to mitigate against that.
Does meta http-equiv=“X-UA-Compatible” content=“IE=edge” impact on non-IE explorer?
No it doesn't. The tag is specific to IE, and is ignored by other browsers.
It was designed in a way that could have been used by other browsers, but it never was. I have seen a few older examples where people recommend specifying version numbers for other browsers, but doing so would never have have any effect.
The only option other than IE=whatever
that is valid is chrome=1
. But even this is only used by IE. It is used by the Chrome Frame plugin, to force a page to use the Chrome rendering engine within IE. But note that Chrome Frame is now deprecated, so you shouldn't be using this any more either.
So in summary: Yes, go ahead and add the meta tag to your code, and don't worry about it affecting other browsers.
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