7

我有一个网站可以在包括 IE 7 到 9 在内的所有浏览器上完全兼容

当我在 IE-10 上尝试它时,我很震惊,错误太多,而且因为我没有时间为 IE-10 修复这个问题,而且我还在使用第三方控件“Telerik”,所以我决定尝试一个简单的解决方案,转Document和浏览器模式回到ie9。

在 IE-10 的开发人员工具中,如果我手动将文档模式设置为 IE9 标准,将浏览器模式设置为 IE9,所有的错误都会消失,我找到了一种强制 IE-10 使用文档模式的方法:

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

但是浏览器模式呢?有没有办法在渲染之前设置它的值?


解决方案:我在这个问题中使用的方式是正确的,但是我的解决方案是更新托管服务器中的窗口,有很多更新,怀疑一个是:Windows Server 2008 R2 x64 版的 Internet Explorer 8 兼容性视图列表更新(KB2598845)

4

1 回答 1

0

You've already got the document mode sorted. Does that not solve the problem? It usually does the trick.

The browser mode shouldn't need to come into play, as it doesn't affect the rendering at all; it just changes the UA string, so it shouldn't have any impact on the page layout.... unless there is something in the code that tries to do a browser-specific hack by looking at the UA string.

If you have got something in your code that does that, then that's where the problem is and you should probably fix it. (using the UA string to affect page layout is generally frowned on as a bad practice anyway; there are usually better ways to do it)

If it's Telerik itself that's doing it, then I would imagine they'd have already been forced to find a fix for it (IE10 has been out for a while and they'd have had other users complaining), so you may find that updating to the latest version will solve the problem.

于 2013-03-26T12:48:13.647 回答