当我将 Intranet 站点添加到 Intranet 安全区域 IE11 时,jQuery 未加载
jQuery is not loading when I add Intranet site to Intranet Security Zone IE11
我有一个 MVC 应用程序,当我将 Intranet 站点(下图中的 http://192.168.72.196)添加到 Internet 选项中的本地 Intranet 站点时,出现 jQuery 错误。当我删除它的网站时。这只发生在 IE 中。
有没有办法解决?
我更改了文档设置,它似乎可以工作,但我不确定它的作用或为什么它的默认值为 7。
从 7 更改为边缘
您的浏览器不支持addEventListener. Use polyfill to improve browser compatibility. For example this gist。
A polyfill, or polyfiller, is a piece of code (or plugin) that provides the technology that you, the developer, expect the browser to provide natively. Flattening the API landscape if you will.
您似乎受到了 2 个问题的影响。首先,您的页面包含一些告诉 IE 使用 IE7 模式的信息,一种可能的可能性是包含这样的元信息:
<meta http-equiv="X-UA-Compatible" content="IE=7">
另一种(更难追踪)的可能性是您的 Web 服务器(ASP.net、PHP 等)正在发送 X-UA-Compatible
header 值 IE=7
, here is more information about this.
另一个问题是 JQuery 2.0 放弃了对 IE 6、7 和 8 的支持,您可以在他们的下载页面上看到:
jQuery 2.x has the same API as jQuery 1.x, but does not support Internet Explorer 6, 7, or 8.
您的选择是使用值 IE=Edge
更新元标记或 header,或者如果出于某些其他原因需要 IE7 支持,则使用 JQuery 1.x .
Internet 设置中有一个复选框让我很头疼,听起来这是你的问题。按 Alt,转到工具 -> 兼容性视图设置。有一个显示 "Display Intranet sites in compatibility view." 的复选框,我猜这就是罪魁祸首,特别是因为只有将它放在 Intranet 区域时才会出现问题。另请注意此复选框不能被覆盖。放置 meta
标签甚至 header 都不会覆盖此复选框。如果您放置 HTTP header,它将覆盖 "document mode" 但不会覆盖 "browser mode." meta
标记没有任何效果。
我有一个 MVC 应用程序,当我将 Intranet 站点(下图中的 http://192.168.72.196)添加到 Internet 选项中的本地 Intranet 站点时,出现 jQuery 错误。当我删除它的网站时。这只发生在 IE 中。
有没有办法解决?
我更改了文档设置,它似乎可以工作,但我不确定它的作用或为什么它的默认值为 7。
从 7 更改为边缘
您的浏览器不支持addEventListener. Use polyfill to improve browser compatibility. For example this gist。
A polyfill, or polyfiller, is a piece of code (or plugin) that provides the technology that you, the developer, expect the browser to provide natively. Flattening the API landscape if you will.
您似乎受到了 2 个问题的影响。首先,您的页面包含一些告诉 IE 使用 IE7 模式的信息,一种可能的可能性是包含这样的元信息:
<meta http-equiv="X-UA-Compatible" content="IE=7">
另一种(更难追踪)的可能性是您的 Web 服务器(ASP.net、PHP 等)正在发送 X-UA-Compatible
header 值 IE=7
, here is more information about this.
另一个问题是 JQuery 2.0 放弃了对 IE 6、7 和 8 的支持,您可以在他们的下载页面上看到:
jQuery 2.x has the same API as jQuery 1.x, but does not support Internet Explorer 6, 7, or 8.
您的选择是使用值 IE=Edge
更新元标记或 header,或者如果出于某些其他原因需要 IE7 支持,则使用 JQuery 1.x .
Internet 设置中有一个复选框让我很头疼,听起来这是你的问题。按 Alt,转到工具 -> 兼容性视图设置。有一个显示 "Display Intranet sites in compatibility view." 的复选框,我猜这就是罪魁祸首,特别是因为只有将它放在 Intranet 区域时才会出现问题。另请注意此复选框不能被覆盖。放置 meta
标签甚至 header 都不会覆盖此复选框。如果您放置 HTTP header,它将覆盖 "document mode" 但不会覆盖 "browser mode." meta
标记没有任何效果。