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" />
If you’re accessing your local site using
localhostor127.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: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
stevendevor something). That should make IE go into normal mode.