How to show a message to IE6/IE7 browsers to upgrade to IE8 and have IE8 not show the IE7 warning

internet explorerinternet-explorer-8

I want to only allow users with IE8 (not IE6, IE7) or another browser to access my site when logged in.

I followed: http://code.google.com/p/ie6-upgrade-warning/
But I also wanted it to not allow IE7 users to use the main site when logged in (they can view public pages.) The reason is that the main web application has a lot of JavaScript effects that will only work 100% in IE8 rendering mode (or any other browser aside from IE.)

The problem with modifying the ie6 upgrade warning to be ie7 is that it looked like IE8 displayed my webpage in an IE7 rendering mode and "lies" about being ie7 and triggers the IE7 stylesheet code.

So how can I force IE8 to always render my page in IE8 mode?

Best Answer

Use this tag:

<meta http-equiv="X-UA-Compatible" content="IE=8" />
Related Topic