简体   繁体   中英

Does meta http-equiv=“X-UA-Compatible” content=“IE=edge” impact on non-IE explorer?

我想在我的html页面中添加<meta http-equiv="X-UA-Compatible" content="IE=edge"> ,以便它可以使用最高模式,如果用户在非IE浏览此页面浏览器,例如,firefox或chrome,这行代码对firefox或chrome有影响吗?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM