Reputation: 19425
I'm running Apache2 on Ubuntu on my virtual machine (dev server).
I have the following code:
<!--[if lt IE 9]>
U r using an old browser!
<![endif]-->
I'm using IE9 and this works fine on the prod server. But when I test my site on my local dev server, I keep getting the 'old browser' message.
What can cause this?
I found the culprit. It was the IE quirk mode that was causing the headache. The following line solved it:
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
Upvotes: 1
Views: 84
Reputation: 449525
If you're accessing your local site using localhost
or 127.0.0.1
, this could be related to this bizarre IE behaviour. Internet Explorer 8 introduced "smart defaults" when it comes to compatibility on local sites:
A large number of line-of-business websites are Internet Explorer 7 capable today. In order to preserve compatibility, Internet Explorer 8 ships with smart defaults based on zone evaluation. In the default state, all sites on the public internet display in Internet Explorer 8 Standards mode (Compatibility View off) and all intranet websites display in Internet Explorer 7 Standards mode (Compatibility View on).
I don't know how IE9 deals with this, but it could be that this is the culprit.
In that case, try accessing your local dev site using some other domain name (like stevendev
or something). That should make IE go into normal mode.
Upvotes: 2