强制IE 11“用户代理字符串”使用标签 [英] Force IE 11 "User agent string" using tags

查看:760
本文介绍了强制IE 11“用户代理字符串”使用标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网站在IE11中损坏。

My website is broken in IE11.

我们都知道HTML标签允许开发者强制IE兼容模式; in example

We all know that HTML tags allow developer to force IE compatibility mode; in example

<meta http-equiv="X-UA-Compatible" content="IE=8, IE=9" />

工作得很好,解决了IE10的可视化问题。

worked great and solved the visualization problems for IE10.

但实际上在IE11上,即使兼容模式设置为 IE9 用户代理字符串设置为默认和javascript不工作。
手动更改用户代理字符串 IE10 解决了我的问题。

But actually on IE11, even if Compatibility mode is set to IE9, User agent string is set to default and javascript doesn't work. Changing manually User agent string to IE10 solved my problems.

对于shure我要解决导致网站错误的实际问题,但实际上我需要一个快速,程序化的方式强制用户代理字符串到IE10 ,因为我

For shure I'm going to solve the real problems that cause website errors, but actually I need a fast, programatic way to force "User agent string" to IE10, since I can't contact every user.

有人可以帮助吗?

推荐答案

解决了!网站正在服务器上安装Dotnet框架4.5

实际上,我没有找到办法强制程序化浏览器用户代理字符串(这是原始问题)。但是用0代码修复网站。

Actually I didn't find a way to force programmatically browsers User agent string (this was the original question). But repaired website with 0 code..

刚刚做了很多测试,在一个服务器上我发现网站是工作,在其他服务器上不是。

Just made lot of tests and on one server I found out that website was working, on other server it wasn't.

好服务器是Win2012,坏服务器是Win2008。在Win2012上运行Aspnet 4.5,在Win2008上不运行。

The "good server" was a Win2012, and "bad servers" were Win2008. On Win2012 Aspnet 4.5 was running, and on Win2008 it wasn't.

我在坏服务器上 em>,一切开始起来了!

I installed dotnet framework 4.5 on bad servers too, and everything started working!

这篇关于强制IE 11“用户代理字符串”使用标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆