简体   繁体   English

是否有可能强制使用任何IE版本到FF视图

[英]is it posible to force any ie version to FF view using <meta http-equiv=“X-UA-Compatible"?

I was googling, about how to fix compability problem .... 我正在搜寻有关如何解决兼容性问题的信息。
and i get this to force ie8 to latest version ie 我得到这个迫使IE8到最新版本即

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

in my mind ... 在我脑海里 ...
is it posible to force any user agent. 是否可以强制任何用户代理。
let say from any browser to firefox 从任何浏览器说到Firefox

example <meta http-equiv="X-UA-Compatible" content="FF=edge;/> or else 示例<meta http-equiv="X-UA-Compatible" content="FF=edge;/>否则

Heh, clever thjnking! 嘿,聪明的笑着! :) But no, this is not possible. :)但是,这是不可能的。

The X-UA-Compatible header is proprietary, and can be used only to switch between various versions of the same browser engine (At the moment, it is supported only by IE, as far as I know). X-UA-Compatible标头是专有的,只能用于在同一浏览器引擎的各个版本之间进行切换(据我所知,目前仅IE支持)。

You'll have to go the hard route and adjust the CSS so it works in all browsers (or serve different style sheets for different browsers). 您必须经过艰苦的努力并调整CSS,以使其在所有浏览器中都可以使用(或为不同的浏览器提供不同的样式表)。

As far as I know this line works also for non IE browsers, for example you can use something like this 据我所知,此行也适用于非IE浏览器,例如,您可以使用类似这样的内容

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />

to force the use of Chrome rendering if available, or the last verison of IE of not. 强制使用Chrome渲染(如果可用),或IE的最新版本。 This code is completely valid but I'm not 100% sure what it means and what it really does :) 这段代码是完全有效的,但我不是100%知道它的意思和真正的作用:)

I have done some google research but I haven't found nothing concrete about it so I think is not a good idea relying only on this line of code for cross-browser compatibility. 我已经做了一些谷歌研究,但是我没有发现任何具体的东西,所以我认为仅依靠这一行代码来实现跨浏览器兼容性不是一个好主意。 Personally I insert this code on my sites because it can do no harm :) 我个人将此代码插入我的网站,因为它不会造成伤害:)

Hope it helps. 希望能帮助到你。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 meta http-equiv X-UA-Compatible - meta http-equiv X-UA-Compatible <meta http-equiv=“X-UA-Compatible” content=“IE=Edge” />在IE 11中无法正常工作 - <meta http-equiv=“X-UA-Compatible” content=“IE=Edge” /> is not working in IE 11 做什么<meta http-equiv="X-UA-Compatible" content="IE=edge">做? - What does <meta http-equiv="X-UA-Compatible" content="IE=edge"> do? 内容页面<meta http-equiv=“X-UA-Compatible” content=“IE=10”/> - Content page with <meta http-equiv=“X-UA-Compatible” content=“IE=10”/> 如果我使用&#39;在Microsoft Edge浏览器上会出现渲染问题 <meta http-equiv=“X-UA-Compatible” content=“IE=7” /> &#39;? - Would rendering problems occur on Microsoft edge browser if I use '<meta http-equiv=“X-UA-Compatible” content=“IE=7” />'? FIX:Ipad迷你HTML边距/填充<meta http-equiv=“X-UA-Compatible” content=“IE=edge,chrome=1”> - FIX: Ipad Mini HTML margin/padding with <meta http-equiv=“X-UA-Compatible” content=“IE=edge,chrome=1”> http-equiv =“与X-UA兼容”的内容 - http-equiv=“X-UA-Compatible” content 错误:元素元数据上的属性http-equiv的值X-UA-兼容错误 - Error: Bad value X-UA-Compatible for attribute http-equiv on element meta 错误值X-UA-兼容元素元素属性http-equiv - Bad value X-UA-Compatible for attribute http-equiv on element meta 当使用http-equiv =“ X-UA-Compatible”时,IE8将不会显示帧 - IE8 will not display frames when http-equiv=“X-UA-Compatible” is used
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM