本文介绍了IE浏览器 - 在系统之间的行为差​​异本地和远程部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在IE浏览器连接问题。当我浏览这是本地部署我的asp.net MVC应用程序,一切工作正常。有些恼人的分歧出现,而我浏览我的系统中应用时不同的主机上。

I have wired issues in IE. While I'm browsing my asp.net mvc application which is deployed locally, everything is working as expected. Some annoying differences appears, while I'm browsing my system when it is deployed on different host.

在这两种情况下,我使用的是IE浏览器的同一个实例,我的主计算机上本地安装。

In both cases, I'm using the same instance of IE, installed locally on my primary computer.

假设我在CSS文件中定义的类:

Suppose I have defined class in css file:

.field-required:before
{
    color: red;
    content: "*";
    font-weight: bold;
}

我也有简单的标签,它使用这个类:

I have also simple label, which uses this class:

<label class="field-required" for="UserName"> Username </label>

当系统被部署在本地,例如code呈现这样的:

When the system is deployed locally, such code renders this way:

同样的code部署远程服务器(名为主机2),从我的主计算机上本地安装我的IE浏览器的第二个选项卡上的访问,呈现如下:

The same code deployed on remote server (named host2), accessed from second tab of my IE browser installed locally on my primary computer, renders as follows:

为什么没有在第二种情况下显示红色的明星?虽然我使用Firefox的一切正常。有没有开启任何安全策略或东西,而在访问远程IE页面,禁用某些功能?昨天我和JSON,这是不承认的问题,而我在浏览我的系统远程部署。当同一系统本地部署一切工作。但尽管如此,我使用的是IE浏览器的同一个实例。由于这是同一个浏览器,这是怎么回事?

Why is the red star not shown in the second case? While I'm using firefox everything works as expected. Is there turned on any security policy or something while accessing remote pages in IE, which disables some functionality? Yesterday I had a problem with JSON, which was not recognized, while I was browsing my system deployed remotely. Everything worked when the same system was deployed locally. But still, I'm using the same instance of IE. Since this is the same browser, what is going on?

更新

这是整个源

<!DOCTYPE html>
<html>
<head>    
    <style>
        .field-required:before
        {
            color: red;
            content: "*";
            font-weight: bold;
        }
    </style>
</head>

<body>
    <div><label class="field-required" for="UserName">Username</label></div>
    <div><input id="UserName" name="UserName" type="text" value="" /></div>
</body>
</html>

缓存是没有问题的。

Caching is not the problem

推荐答案

内容属性IE8 的作品,但在IE7中不起作用。

The content property works in IE8, but does not work in IE7.

因此​​,我敢肯定,你的页面在IE8模式正在呈现局部的,但你的另一台服务器上它是在IE7兼容性模式正在呈现。

Therefore, I'm sure that your page is being rendered in IE8 mode locally, but on your other server it is being rendered in IE7 Compatability Mode.

您可以从两个位置打开网页,preSS F12,并期待在文档模式设置为验证这一点。

You can open the page from both locations, press F12, and look at the "Document Mode" setting to verify this.

有各种原因,这可能发生。

There are various reasons this could be happening.

请参阅:

最有可能的原因是你$ P $ IE中的pssedIE7兼容模式按钮。

The most likely cause is that you pressed the "IE7 compatibility mode" button in IE.

您可能能够速战速决,加入这个元标记的问题:

You can possibly "quick fix" the issue by adding this meta tag:

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

如果不是,往下看在链接该列表,看看哪些原因是原​​因。

If not, look down that list in the link and see which reason is the cause.

这篇关于IE浏览器 - 在系统之间的行为差​​异本地和远程部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-27 05:55