Reputation: 17064
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.
In both cases, I'm using the same instance of IE, installed locally on my primary computer.
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>
When the system is deployed locally, such code renders this way:
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:
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?
UPDATE
This is the entire source
<!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
Upvotes: 3
Views: 1696
Reputation: 228152
The content
property works in IE8, but does not work in 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.
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.
See: http://hsivonen.iki.fi/doctype/#ie8modes
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.
Upvotes: 2
Reputation: 42333
Assuming everything is being deployed, and that this is IE 8, then my guess is it could be compatibility mode. Our sites often 'fail' QA because of the same problem - regardless of how many times I tell the QA team to check compat mode!
By default IE8 shows intranet sites in compatibility mode meaning that you can get differences when you deploy it to a non-intranet location. Equally, it could be manual overrides (i.e. 'my machine' but not this one, or indeed 'not my machine' but everything else) on compatibility mode causing the issue.
Check compat mode locally and remotely and make sure they are the same. If not, set it to be the same when viewing it on the remote machine.
Then look at configuring IE not to use compat mode by default, if that's what it's been doing.
If not - then it could be caching or something not getting deployed.
I'd make sure that everything is getting deployed, empty IE's cache and try it again.
Upvotes: 1