问题标签 [x-ua-compatible]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
309 浏览

webbrowser-control - 在不使用注册表项的情况下,无法让 ActiveX WebBrowser 以默认值以外的方式呈现

ProgID="shell.explorer.2"在 VB.Net 插件开发中使用 ActiveX webbrowser 控件时遇到问题,以便在SAP Business 164 位服务器上运行 32 位。localhost:1234它设置为显示来自OWIN SelfHosted WebAPI. 站点中的页面使用AngularJS.

这个问题在 SO 上是众所周知的,FEATURE_BROWSER_EMULATION更新确实对我有用,但我需要找到另一个解决方案。由于我正在编写一个插件,而托管 EXE 实际上是"SAP Business One.exe",添加注册表项会更改应用程序中每个 Webbrowser 控件的设置,无论它们是我的、应用程序的一部分,甚至是其他人插件的一部分。

由于我的 Angularjs 应用似乎对 IE10 很满意,并且我想将要求级别设置得尽可能低,所以我想请求 IE10 渲染。

文档类型一直是<!DOCTYPE html>.

我已经尝试了<meta http-equiv="x-ua-compatible" content="IE=IE10">- 甚至在顶部<head>并且模式不会切换。

我已经在 .htm 文件的服务器端的响应头中添加了 X-UA-Compatible: IE=10 - 我可以清楚地看到 Fiddler 中的头,并且渲染模式不会改变。

所以我的帮助请求很多 - 有人可以帮助解决以下问题:

1) 为什么 X-UA-Compatible 标头不能以元形式或作为我认为应该覆盖 Intranet 设置的服务器标头工作?我究竟做错了什么?

2)有没有办法通过webbrowser控件的activex接口的属性或方法来设置渲染模式,即使我不得不求助于C++?

3) 有没有办法以广告的拥有进程不同的方式包装控件,即匹配 myaddin.exe 名称而不是主应用程序?

我真的很想让这个模式开关工作,否则我可能不得不使用 IE7 兼容代码重写,我真的不想这样做!

提前感谢您的帮助,

标记

0 投票
0 回答
258 浏览

crash - http-equiv="X-UA-Compatible" 和 IE - 9 兼容性视图 - 站点崩溃

我添加了这个标签:

进入我的标题。

在 IE 9 中,如果我将网站的域添加到浏览器的兼容性视图列表中,然后我调用我的网站,我的浏览器就会崩溃。

如果我在 IE 11 上工作并且我将进入浏览器模式 9,浏览器也会崩溃。

我必须添加这个元标记。我能做些什么?我哪里错了?

额外的:

我发现这个元标记不能很好地与这部分脚本结合使用:

我在正文中调用此脚本:[%- IF BROWSER=="MSIE" AND BROWSERVERSION < "9.0" -%]style="behavior: url(/css/csshover.h);" [%- END -%]

0 投票
2 回答
2701 浏览

asp.net-mvc - X-UA 兼容不能在 IE 9 中用于 Intranet 站点

我们正在使用 asp.net mvc 5 制作一个 Intranet 站点,但在 IE 9 中的兼容性设置存在一些问题。该站点需要在没有兼容性视图的情况下显示。
我们做了一些研究,做了这些:
1. 在 layout.cshtml 和 login.cshtml 中添加 meta

2.我们在web.config中添加customheader

这两个仍然不起作用。我们的网站在打开时仍会进入兼容模式。我注意到的一件事是,如果我们在 IE9 中打开开发人员工具并打开页面,X-UA-Compatible 标记正在工作,但如果开发人员工具关闭,则不会。
我们在 IE 11 上对此进行了测试,它运行良好。任何人都可以建议这里发生了什么?

0 投票
1 回答
911 浏览

javascript - XMLHttpRequest 在 32 位机器上不起作用,IE10 在 IE8 标准文档模式下

想知道以前是否有人遇到过这个奇怪的 IE / javascript 错误。

在 IE8 标准文档模式下使用 IE10 的 32 位机器上,javascript 在尝试创建新的 XMLHttpRequest 对象时返回 TypeError。这是一个问题,因为我们的一个页面通过 X-UA 兼容的 IE=8 元标记(页面的要求)强制 IE8 标准。

新窗口.XMLHttpRequest();
TypeError:对象不支持此操作

来自 64 位机器(IE8 标准中的 IE10)的完全相同的代码行工作得很好。

32 位 IE10 IE8 标准
32 位 IE10 IE8 标准

64 位 IE10 IE8 标准
64 位 IE10 IE8 标准

0 投票
1 回答
18800 浏览

html - 为什么 http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" 未在 W3C Validator 中验证?

我有:

http://validator.w3.org/中进行验证时,我收到此错误:

具有值为 X-UA-Compatible 的 http-equiv 属性的元元素必须具有值为 IE=edge 的内容属性。

我正在使用.NET/Razor,当然还有在本地使用IIS。有没有办法在不编辑任何web.config文件的情况下解决这个问题?谢谢转发。

0 投票
1 回答
295 浏览

asp.net - 如何使在 IE7 中运行良好的现有网页在 IE11 中运行?

我一直在寻找永久解决方案,以使在 IE7 中完美运行的现有页面(ASP.Net)也可以在 IE11 中运行。我已经看到了一些操纵元标记的解决方案。

元 http-equiv="X-UA-Compatible" 内容="IE=edge"

有人可以提供一些真正的解决方案来解决这些问题吗?

现在我在 IE11 中看到太多的 CSS 问题和 Javascript 错误,这在 IE7 中运行良好。

如果有人提供没有 CSS Hacks 或操纵元标记内容的解决方案,那将非常有帮助。我没有将我的网站定位为跨浏览器,但无论其版本如何,它至少应该在 Internet Explorer 中工作。

我从 MSDN 看到了以下参考资料:但它没有提供任何解决方案来让网站在所有版本的 IE 中呈现,它正在解决有关旧版浏览器的问题。

https://msdn.microsoft.com/library/ee318404.aspx

提前致谢。

0 投票
1 回答
1326 浏览

ruby-on-rails - 如何通过 Ruby-on-Rails 防止 Intranet 站点的 IE11 兼容模式?

我正在做一个客户只允许他们的雇主查看 Intranet 站点的项目。因此,在我的项目中,IE11 默认为 Intranet 站点的兼容模式。元标记<meta http-equiv="X-UA-Compatible" content="IE=edge">被覆盖。即使在 Intranet 站点上,我们如何设置 content="IE=edge"?

0 投票
0 回答
462 浏览

internet-explorer-8 - IE8 不支持 getElementsByClassName

由于我用wordpress制作网站,这是IE7和IE8中未显示的jquery影响部分,阅读浏览器错误,它显示:对象不支持此方法:'getElementsByClassName',在这种情况下,我在header.php中添加以下代码:

并证明浏览器版本的合理性:

而对于js文件部分:
我只是改变

哇.js

代码到

wow_ie8.js

到这段代码:

不知何故,网站仍然显示错误:对象不支持此方法:'getElementsByClassName'

有没有人可以给我解决这个问题的解决方案?十分感谢!!

0 投票
2 回答
1138 浏览

html - Using X-UA-Compatible to emulate IE9 in corporate setup

I have been reading up about document type emulating and compatibility mode in IE and have to say its quite a bit to get one's head around.

I have developed an App with Bootstrap 3 and Ember rendering a few pages controlled through a menu.

I tested this in all browsers, Webkit, Moz, and IE and all seemed perfect. I work in a large corporate, so when I decided to test it on some of my colleagues' computers, on IE, I got a blank page. Now I found that very strange because they were all running IE10 or IE11, although there is the odd IE9. I couldnt understand it because it renders perfectly on my IE.

So anyway, I started hitting F12 on their browsers and realised that many of them had IE7 emulating even though they were running IE10 or 11.

I read a bit about this issue, and I found the following:

So I proceeded to add this line to my page so it is as follow:

Now my question is this: Am I correct in assuming that if there was some sort of group policy set when using IE at work, that this workaround would solve the issue?

I will do some testing tomorrow morning, but just wanted to know if that is along the right lines?

Many people at work use Chrome and Firefox or whatever they want to, but there are obviously quite a few that use IE.

0 投票
1 回答
169 浏览

internet-explorer - IE9 - 主页中的怪癖模式和特定 iframe 中的“Internet Explorer 9 标准”

我们有一个旧网站,它在我们所有的 IE9 客户端上以 Quirks 模式运行:

在此处输入图像描述

另外,为了完整起见:

在此处输入图像描述

该网站由许多 iframe 组成,并且出现了一个新要求:
我需要创建一个新 iFrame,其中将使用 bootstrap,并且我需要在Internet Explorer 9 标准中渲染此框架的内容(即禁用 Quirks 模式仅在此 iframe 中并照常渲染)。

我试过把

在 iframe 内部,但它不起作用。