[英]Meta tag force to use IE Edge or IE8 but not IE9
I face 80020101 error issue in ie9 and half of my script classes face this issue so I cannot fix it and my site works well in ie8. 我在ie9中遇到80020101错误问题,我的脚本类中有一半都遇到了此问题,所以我无法修复它,并且我的网站在ie8中运行良好。 How can I force to use IE8 if the browser is IE9 but if the browser version is higher than IE 9, that one should be used.
如果浏览器是IE9,但是如果浏览器版本高于IE 9,我该如何强制使用IE8。
You can try this: 您可以尝试以下方法:
<!DOCTYPE html>
<html>
<head>
<title>My Web</title>
<meta http-equiv="X-UA-Compatible" content="IE=80" />
The meta must be the first after the title. 元必须是标题之后的第一个。 But not sure if this will solve the issue 80020101. Not everything will be running in IE9+ if it was using some deep stuff of the IE 8-
但是不确定这是否能解决问题80020101。如果它使用的是IE 8的较深版本,则不是所有内容都将在IE9 +中运行。
To target the edge check this question: Why does IE9 opens in Document Mode as IE7 standards? 要瞄准边缘,请检查以下问题: 为什么IE9以文档模式作为IE7标准打开?
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
If I understood well you want to force IE 8 when browser is IE 9 and let it free when it's a higher version. 如果我了解得很好,那么您想在浏览器为IE 9时强制使用IE 8,而在更高版本的浏览器中使其免费 。 You can do it with conditional comments :
您可以使用条件注释来做到这一点:
<!--[if IE 9]>
<meta http-equiv="X-UA-Compatible" content="IE=80" />
<![endif]-->
This will include meta
only for IE 8 and will leave it out for any other version. 这将仅包括用于IE 8的
meta
,而将其保留用于任何其他版本。 Please note that unless you're facing an IE 9 specific bug then you may have the same issue on higher versions, maybe because IE 8 was broken). 请注意,除非您遇到IE 9特定的错误,否则在更高版本上可能会遇到相同的问题,可能是因为IE 8损坏了。 To solve this I would rewrite your scripts to work on IE 9 and I would conditionally include old scripts when IE 8:
为了解决这个问题,我将重写您的脚本以在IE 9上运行,并且有条件地在IE 8上包括旧脚本:
<!--[if lte IE 8]>
<script src=oldscript.js"></script>
<![endif]-->
<!--[if gte IE 9]>
<script src=newScript.js"></script>
<![endif]-->
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.